laravel将本地项目迁移到服务器报错解决

报错

1.Warning: require(): open_basedir restriction in effect. File(/www/wwwroot/www.ctfcg.com/vendor/autoload.php) is not within the allowed path(s): (/www/wwwroot/www.ctfcg.com/public/:/tmp/:/proc/) in /www/wwwroot/www.ctfcg.com/public/index.php on line 24

2.Warning: require(/www/wwwroot/www.ctfcg.com/vendor/autoload.php): failed to open stream: Operation not permitted in /www/wwwroot/www.ctfcg.com/public/index.php on line 24

3.Fatal error: require(): Failed opening required '/www/wwwroot/www.ctfcg.com/public/../vendor/autoload.php' (include_path='.:/www/server/php/72/lib/php') in /www/wwwroot/www.ctfcg.com/public/index.php on line 24

1.解决第一条关闭防跨站

laravel将本地项目迁移到服务器报错解决_第1张图片
image.png

2.加入vendor, 在项目目录下使用composer update

composer update
php artisan cache:clear
php artisan route:clear
php artisan dump-autoload

k

你可能感兴趣的:(laravel将本地项目迁移到服务器报错解决)