2015-11-03 98 views
0

我有以下問題。在index.html我有Silex自動加載權限被拒絕

require_once __DIR__.'/vendor/autoload.php'; 

而我得到了這個錯誤。

PHP Warning: require_once(/var/www/html/vendor/autoload.php): failed to open stream: Permission denied in /var/www/html/index.php on line 9 
PHP Fatal error: require_once(): Failed opening required '/var/www/html/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/index.php on line 9 

但是對於整個的/ var/www/html等我通過設置權限 「搭配chmod -R 777」

我在哪裏可以犯了一個錯誤?

非常感謝。

回答

0

試試下面兩個命令:

chown www-data: ./* -R 

和:

chmod 775 ./* -R 

(假設你是在/var/www/html文件夾)