Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/294.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php yii框架目录中没有这样的文件_Php_Yii - Fatal编程技术网

Php yii框架目录中没有这样的文件

Php yii框架目录中没有这样的文件,php,yii,Php,Yii,最近,我尝试安装一个需要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

最近,我尝试安装一个需要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();
//必要时更改以下路径
$yii=dirname(_文件__)。'/framework/yii.php';
$config=dirname(_文件)'/application/config/web.php';
如果(!是可读的($config))
退出('缺少配置文件。请运行');
//在生产模式下,拆下以下行
定义('yi_DEBUG')或定义('yi_DEBUG',true);
//指定每个日志消息中应显示多少级别的调用堆栈
已定义('yi_TRACE_LEVEL')或定义('yi_TRACE_LEVEL',3);
需要一次(亿元);;
Yii::createWebApplication($config)->run();
我还对目录(777)进行了chmoded,但没有任何结果。
非常感谢您的帮助。

如果您确定文件存在并且路径正确,请尝试此操作

chmod -R 777 /home/site/public_html/

-R
递归提供权限。

您的问题路径是/home/site/public\u html/framework/yii.php
但在照片中,我看到了:/home/mbbclanv/。。。。。。这是错误的。

你确定文件
/home/site/public\u html/framework/yii.php
存在吗?你能显示你的目录结构吗?@excluded\u一次home之后的站点目录是什么?在屏幕截图中,我看不到任何站点目录。。。你有没有试着去看看关卡里有什么?