【发布时间】:2014-10-30 15:24:37
【问题描述】:
最近,我尝试安装一个需要 yii 框架的应用程序。 不幸的是,它似乎在我的框架目录中找不到 yii.php 文件,因此给了我一个内部服务器错误。
我已经搜索了很长时间的答案,但没有任何结果。我很确定目录和文件都在那里。
错误:
PHP Warning: require_once(/home/site/public_html/framework/yii.php): failed to open stream: No such file or directory in /home/site/public_html/index.php on line 15
PHP Fatal error: require_once(): Failed opening required '/home/site/public_html/framework/yii.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/site/public_html/index.php on line 15
index.php:
// change the following paths if necessary
$yii=dirname(__FILE__).'/framework/yii.php';
$config=dirname(__FILE__).'/application/config/web.php';
if(!is_readable($config))
exit('Missing configuration file. Please run the <a href="./install">installation</a>.');
// 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();
我还对目录 (777) 进行了 CHMODDED,但没有任何结果。 感谢您的帮助。
【问题讨论】:
-
你确定文件
/home/site/public_html/framework/yii.php存在吗? -
你能展示你的目录结构吗?
-
@excluded_once prntscr.com/51odme
-
首页后的站点目录是什么?在屏幕截图中我看不到任何站点目录...您是否尝试 var_damp $yii 来查看那里的通行证?