I am trying to move the public
folder to other place. However, I can't find the place to modify public_path()
variable. Now, the 'public_path()' return the wrong path of folder.
在哪里可以将变量设置为public_path()
?
I am trying to move the public
folder to other place. However, I can't find the place to modify public_path()
variable. Now, the 'public_path()' return the wrong path of folder.
在哪里可以将变量设置为public_path()
?
您可以使用ioc容器覆盖公共路径:
对我来说,完美无瑕的是,在public/index.php
行中增加了以下三行:
$app->bind('path.public', function() {
return __DIR__;
});