Joh*_*ith 8 laravel laravel-forge laravel-5.2
我刚刚在.env文件中更改了一个常量.使用php-cli(通过修补程序)正确显示新值,但不能在我的Web应用程序(php-fpm)中显示.
到目前为止,我已按照建议尝试了一切:
sudo service nginx restart
sudo service php7.0-fpm restart
sudo service php7.0-fpm reload
Run Code Online (Sandbox Code Playgroud)
.
php artisan config:cache
Run Code Online (Sandbox Code Playgroud)
这将在bootstrap/cache/config.php中生成缓存配置文件
php artisan config:clear
Run Code Online (Sandbox Code Playgroud)
这将删除bootstrap/cache/config.php中的缓存配置文件
php artisan cache:clear
Run Code Online (Sandbox Code Playgroud)
究竟是做什么的?它清楚了什么类型的缓存?
php artisan clear-compiled
Run Code Online (Sandbox Code Playgroud)
这个清楚的编译类
composer dump-autoload
Run Code Online (Sandbox Code Playgroud)
这将生成/更新composer autoload文件.
我有一些不属于任何配置文件的.env变量.因此,运行任何工匠命令对我来说都是无用的.
上述php artisan命令都没有直接处理$ _ENV.
似乎$ _ENV存储在服务器中的某个位置,并且一旦填充了属性,laravel就无法更新它.
我发现的唯一解决方案是重启服务器.
我正在运行一个Laravel Forge实例.
小智 2
尝试删除以下文件中的配置:Bootstrap/cache/config.php
您也可以尝试: php artisan config:cache 或 php artisan cache:clear
归档时间: |
|
查看次数: |
8414 次 |
最近记录: |