更新时间:2022-11-04 19:40:38
很容易用一个简单的搜索找到这一点。
Quite easy to find this with a simple search.
请参阅:https://laracasts.com/discuss/channels/general-discussion/where-do-you-set-public-directory-laravel-5
在您的index.php文件添加以下3行。
In your index.php add the following 3 lines.
/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/
$app = require_once __DIR__.'/../bootstrap/app.php';
// set the public path to this directory
$app->bind('path.public', function() {
return __DIR__;
});