无法打开流:没有这样的文件或目录(Laravel)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53203254/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
failed to open stream: No such file or directory (Laravel)
提问by Ehsan Mousavi
I renamed my UsersController.php
file to ~UsersController.php
for testing purposes and everything was working fine until I renamed it back to UsersController.php
and now I'm getting the below error
我将我的UsersController.php
文件重命名为~UsersController.php
用于测试目的,一切正常,直到我将其重命名回UsersController.php
,现在我收到以下错误
include(C:\xampp\htdocs\xxx\vendor\composer/../../app/Http/Controllers/~UsersController.php): failed to open stream: No such file or directory
include(C:\xampp\htdocs\xxx\vendor\composer/../../app/Http/Controllers/~UsersController.php): failed to open stream: No such file or directory
i'm getting the above error when I want submit form to UsersController
while I didn't change anything in my route file or views.
当我想提交表单时出现上述错误,UsersController
而我没有更改路由文件或视图中的任何内容。
回答by Vahe Shak
Try
php artisan config:cache
php artisan config:clear
composer dump-autoload -o
尝试
php artisan config:cache
php artisan config:clear
composer dump-autoload -o