2014-10-30 55 views
2

最近,我试图安装一个需要yii框架的应用程序。 不幸的是,它似乎无法找到位于我的框架目录中的yii.php文件,因此给我一个内部服务器错误。yii框架目录中没有这样的文件

我搜索了很长时间的答案,没有任何结果。我很确定目录和文件都在那里。

错误:

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(); 

我也CHMODDED目录(777),但没有任何结果。 帮助表示赞赏。

+0

你确定文件'/ home/site/public_html/framework/yii.php'存在吗? – dyachenko 2014-10-30 16:49:22

+0

是的,我确定。 – user2722718 2014-10-30 16:54:57

+0

你可以显示你的目录结构吗? – nowiko 2014-10-31 09:30:05

回答

0

如果您确定文件存在,路径是否正确试试这个

chmod -R 777 /home/site/public_html/ 

-R递归提供许可。

1

您问题中的路径是/home/site/public_html/framework/yii.php 但是在图片中,我看到:/ home/mbbclanv/......这是错误的。

相关问题