0
這是我第一次上傳並共享Laravel 5項目到服務器。「致命錯誤:要求():失敗打開需要...」上傳laravel 5項目到服務器後出錯
我在網上學習了很多資源和主題來解決這個問題,但是我不能。
這是我的服務器上的文件夾和文件的結構:
這是我在的public_html/index.php的文件的變化:
require __DIR__.'/../tc/bootstrap/autoload.php';
$app = require_once __DIR__.'/../tc/bootstrap/app.php';
根據其他研究的主題我認爲所有的事情都可以。但是當打開主域名時,我遇到以下錯誤:
Warning: require(/home/tc/domains/tc-iran.ir/public_html/../tc/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/tc/domains/tc-iran.ir/public_html/index.php on line 22
Warning: require(/home/tc/domains/tc-iran.ir/public_html/../tc/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/tc/domains/tc-iran.ir/public_html/index.php on line 22
Fatal error: require(): Failed opening required '/home/tc/domains/tc-iran.ir/public_html/../tc/bootstrap/autoload.php' (include_path='.:/usr/local/lib/php') in /home/tc/domains/tc-iran.ir/public_html/index.php on line 22
問題和解決方案是什麼?
你有沒有正確設置上傳的文件的權限和所有權? – Alex
'public_html'有775個,包含所有laravel文件的'tc'有755個權限。 –