I renamed my example.env
to .env
in order to remove previous errors with my application. However, I noticed
APP_KEY=SomeRandomString
near the top of the .env
file an new something was off. When I run
PHP artisan key:generate
and recheck the .env
file...nothing happens.
My stack includes Apache2, Ubuntu Server 14.04 LTS (HVM), PHP 5.5.36
看起来Laravel仍然使用旧的.env
文件,即使该文件已被删除,也可以尝试使用php artisan optimize
.env
优化类加载php artisan optimize
然后重新生成密钥。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.