我是CakePHP的新手,我正在尝试安装它。我抽出一切,创建所需的文件/文件夹,现在出现以下错误:include_once:无法打开流:没有这样的文件或目录Cakephp 2.4.5
Warning (2): include_once(C:\xampp\htdocs\TravelBuddy\app\Config\database.php): failed to open stream: No such file or directory [CORE\Cake\Model\ConnectionManager.php, line 67]
Warning (2): include_once() [function.include]: Failed opening 'C:\xampp\htdocs\TravelBuddy\app\Config\database.php' for inclusion (include_path='C:\xampp\htdocs\TravelBuddy\lib;.;C:\xampp\php\PEAR') [CORE\Cake\Model\ConnectionManager.php, line 67]
文件database.php
不存在。我必须创建它吗?
这里是ConnectionManager
的代码,其中的问题是:
protected static function _init() {
include_once APP . 'Config' . DS . 'database.php';
if (class_exists('DATABASE_CONFIG')) {
self::$config = new DATABASE_CONFIG();
}
self::$_init = true;
}
该警告讯息清楚地告诉您该文件不存在,您应该创建它并在其中写入数据库连接 –
请查看“APP”。 '配置'。 DS。 'database.php'是。也许'APP'常量没有被正确定义 – cornelb