所以我一直在我的实时服务器上收到此错误,但在我的本地主机上却没有,在我的本地主机上一切正常,但是当我在在线服务器上部署我的网站时,它一直给我这个错误
file_put_contents(C:\appname\storage\framework\views/27f511f5644086daa68b2cf835bf49f5148aba43.php): failed to open stream: No such file or directory
我尝试了php artisan config:cache
但没有真正起作用
最佳答案
我认为您的问题是由于 Laravel Configuration Caching .我建议你
- 删除配置缓存文件
- 刷新应用程序缓存
- 创建缓存文件以加快配置加载速度
为此,请在命令行上运行以下 Artisan 命令
- php artisan 配置:清除
- php artisan 缓存:清除
- php artisan 配置:缓存
如果您无法访问服务器上的命令行,则可以 programmatically execute commands像这样:
Route::get('/clear-cache', function() {
$exitCode = Artisan::call('config:clear');
$exitCode = Artisan::call('cache:clear');
$exitCode = Artisan::call('config:cache');
return 'DONE'; //Return anything
});
我希望这对您有帮助。
关于php - file_put_contents(C :\storage\framework\views/27f511f5644086daa68b2cf835bf49f5148aba43. php): 无法打开流: 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49287758/