我有一个从cpanel下载的laravel5项目,但它不工作


I have a laravel5 project downloaded from the cpanel but it's not working

我已经将项目文件添加到我的mac中的htdocs文件中并导出数据库,composer安装工作正常,php artisan-migrate给了我一个重复数据库和表的错误。但是当我运行PHP工匠服务时,它会给我错误,并且不会在localhost:8000上运行下面是我得到的错误

[ErrorException]
chdir(): No such file or directory (errno 2)

这通常是因为Laravel找不到你的公用文件夹。

这里建议的一个解决方案是修改这一行:

chdir($this->laravel->publicPath());

in vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php to:

chdir('/');

清空数据库,然后运行php artisan migrate。然后使用

For server error:

表示你的Laravel应用程序找不到公用文件夹。

改变
chdir($this->laravel->publicPath());

在vendor/laravel/framework/src/Illuminate/Foundation/Console/ServeCommand.php中

chdir('/');