2014-10-30 38 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/......這是錯誤的。

相關問題