简体   繁体   English

将laravel 5项目上载到服务器后,出现“致命错误:require():无法打开...”错误

[英]“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. 这是我第一次希望将Laravel 5项目上传并共享到服务器中。

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 : 这是我对public_html / index.php文件的更改:

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 . 我只是将tc (主要的laravel内容项目文件)移到domains接下来是存在的另一个public_html文件夹。

This is New folders Structure on the server: 这是服务器上的新文件夹结构:

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 致命错误:require():在 Laravel 项目/Serpwow API 中打开所需的“vendor/autoload.php”失败 - Fatal error: require(): Failed opening required 'vendor/autoload.php' in Laravel project/Serpwow API 致命错误:require():无法打开所需的“{filename}” - Fatal error: require(): Failed opening required '{filename}' phpMyAdmin致命错误-require():必须打开失败 - phpMyAdmin Fatal Error - require(): Failed opening required 致命错误:require():需要打开失败 - Fatal error : require(): Failed opening required 致命错误:require():需要打开失败 - Fatal error: require(): Failed opening required mediawiki致命错误:require_once():服务器移动后需要打开失败 - mediawiki Fatal error: require_once(): Failed opening required after server moved laravel 警告和致命错误中要求打开失败 - failed opening required in laravel warning and fatal error 致命错误:require()[function.require]:需要打开失败 - Fatal error: require() [function.require]: Failed opening required Laravel PHP致命错误:require():必须打开失败…在第17行上的bootstrap / autoload.php - Laravel PHP Fatal error: require(): Failed opening required … bootstrap/autoload.php on line 17 致命错误:require_once():需要打开失败 - Fatal error: require_once(): Failed opening required
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM