简体   繁体   中英

“Fatal error: require(): Failed opening required…” error after upload laravel 5 project to server

It is first time that I want to upload and share a Laravel 5 project into server.

I study many resources and topics on the web for solve this problem but I can not.

this is Structure of my folders and files on the server :

在此处输入图片说明

And this is my changes in public_html/index.php file :

require __DIR__.'/../tc/bootstrap/autoload.php';

$app = require_once __DIR__.'/../tc/bootstrap/app.php';

according other studied Topics I think that all thing is ok. but when opening main domain I was faced with the following errors:

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

what is Problem and solution?

I don't know Why by I solve this problem .

I just move tc (main laravel content project files) into domains Next another public_html folder that exists there .

This is New folders Structure on the server:

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM