我正在從事兩天的Laravel項目,並且我從未遇到任何遷移問題。但今天上午,當我嘗試php artisan migrate --seed
,我有以下錯誤:無法打開流:權限被拒絕 - Artisan
[ErrorException]
Include(D:\Programmes\xampp\htdocs\Laman): failed to open stream: Permission denied
於是,我就php artisan cache:clear
,php artisan config:clear
和php artisan tinker
並得到了確切的同樣的錯誤。當我看着我的允許,一切都看起來很好:
drwxr-xr-x 1 Foo Bar 197121 0 Apr 26 06:48 app/
-rwxr-xr-x 1 Foo Bar 197121 1646 Apr 25 17:21 artisan*
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 17:21 bootstrap/
-rw-r--r-- 1 Foo Bar 197121 1378 Apr 25 19:54 composer.json
-rw-r--r-- 1 Foo Bar 197121 123397 Apr 25 19:54 composer.lock
drwxr-xr-x 1 Foo Bar 197121 0 Apr 26 06:32 config/
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 17:21 database/
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 23:09 node_modules/
-rw-r--r-- 1 Foo Bar 197121 1075 Apr 25 22:52 package.json
-rw-r--r-- 1 Foo Bar 197121 1055 Apr 25 17:21 phpunit.xml
drwxr-xr-x 1 Foo Bar 197121 0 Apr 26 06:24 public/
-rw-r--r-- 1 Foo Bar 197121 3424 Apr 25 17:21 readme.md
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 17:21 resources/
drwxr-xr-x 1 Foo Bar 197121 0 Apr 26 06:48 routes/
-rw-r--r-- 1 Foo Bar 197121 563 Apr 25 17:21 server.php
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 17:21 storage/
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 17:21 tests/
drwxr-xr-x 1 Foo Bar 197121 0 Apr 25 19:55 vendor/
-rw-r--r-- 1 Foo Bar 197121 505 Apr 25 23:14 webpack.mix.js
PHP工匠緩存:從項目目錄清晰,然後搭配chmod -R 777應用/存儲和最後的PHP工匠轉儲自動加載 – JYoThI
閱讀我的文章entierly請 – Wizix
沒有你嘗試這個命令php artisan dump-autoload – JYoThI