南龙 2012-01-05 20:57:49 4270次浏览 7条回复 0 0 0

Warning: CApplication::require(H:\www\sodu/novel/config/file.php) [capplication.require]: failed to open stream: No such file or directory in H:\www\sodu\framework\base\CApplication.php on line 127

Fatal error: CApplication::require() [function.require]: Failed opening required 'H:\www\sodu/novel/config/file.php' (include_path='.;C:\php5\pear') in H:\www\sodu\framework\base\CApplication.php on line 127

<?php
// 在生产环境中请删除此行
defined('YII_DEBUG') or define('YII_DEBUG',true);
// 包含Yii引导文件
require_once(dirname(__FILE__).'/framework/yii.php');
// 创建一个应用实例并执行
$configFile=dirname(__FILE__).'/novel/config/file.php';
Yii::createWebApplication($configFile)->run();

  • 回复于 2012-01-05 21:34 举报

    应该是没找到配置文件,默认不是main.php吗?

  • 回复于 2012-01-06 09:46 举报

    配置文件不存在。。

  • 回复于 2012-01-06 10:33 举报

    我按照手册上的例子复制的

  • 回复于 2012-01-06 10:54 举报
    // change the following paths if necessary
    $yii=dirname(__FILE__).'/../framework/yii.php';
    $config=dirname(__FILE__).'/protected/config/main.php';
    
    // remove the following lines when in production mode
    defined('YII_DEBUG') or define('YII_DEBUG',true);
    // specify how many levels of call stack should be shown in each log message
    defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
    
    require_once($yii);
    Yii::createWebApplication($config)->run();
    
  • 回复于 2012-01-06 11:31 举报

    [attach]582[/attach]

    http://localhost/sodu/
    出现下面的错误

    Warning: require_once(H:\www\sodu/../framework/yii.php) [function.require-once]: failed to open stream: No such file or directory in H:\www\sodu\index.php on line 11
    
    Fatal error: require_once() [function.require]: Failed opening required 'H:\www\sodu/../framework/yii.php' (include_path='.;C:\php5\pear') in H:\www\sodu\index.php on line 11
    
  • 回复于 2012-01-06 12:26 举报

    很明显是路径错了!
    $yii=dirname(__FILE__).'/framework/yii.php';

  • 回复于 2012-01-06 12:26 举报

    没有找到框架,

您需要登录后才可以回复。登录 | 立即注册