index.php文件内容不正确,无法托管网站

时间:2018-03-25 02:04:30

标签: php laravel hosting

我想知道为什么我的index.php内容文件不正确,特别是在注册自动加载器时。我读了

|------------------------------------------------------------------------ 
--
| Register The Auto Loader
|------------------------------------------------------------------------ 
--
|
| Composer provides a convenient, automatically generated class loader 
for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels great to relax.
|
*/

require __DIR__.'/../projectlaravel2/vendor/autoload.php';

虽然其他人(在Youtube教程中教授如何托管网站)

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

每当我尝试访问我的域名时,我总会收到错误:

PHP Fatal error:  require(): Failed opening required 
'/home/aldohasi/projectlaravel3/vendor/composer/../symfony/polyfill- 
mbstring/bootstrap.php'(include_path='.:/opt/alt/php56/usr/share/pear:/opt/alt/php56/usr/share/php') in /home/aldohasi/projectlaravel3/vendor/composer/autoload_real.php on line 66

我确实在我的vendor文件夹中找到了自动加载器文件,并尝试将其移动到bootstrap文件夹,将index.php中的vendor更改为bootstrap。我仍然得到同样的错误。有什么想法吗?

0 个答案:

没有答案