本地環境下,新建的路由總是報錯
http://localhost/laravel52/public/?系統原有的是正常的,但用
Route::get('basic/{$id}',?function?($id)?{ ????return?'sdsadasd'.$id; });
網址打開,總是報
Not Found
The requested URL /laravel52/public/basic/1 was not found on this server.
錯誤
這是為什么?
http://localhost/laravel52/public/?系統原有的是正常的,但用
Route::get('basic/{$id}',?function?($id)?{ ????return?'sdsadasd'.$id; });
網址打開,總是報
The requested URL /laravel52/public/basic/1 was not found on this server.
錯誤
這是為什么?
2019-03-04
舉報
2019-07-16
mac上開啟phpopenssl是不行的,執行php會出現錯誤提示,找不到dll庫。
2019-07-16
第四步的 .htaccess 文件里面已經配置的相關內容,所以不用做。
2019-07-16
非常感謝您的分享!這坑已填n個小時。
2019-07-16
我是mac,做了前三步就ok了。沒做第四步。
2019-03-04
我找到問題的答案了,我把答案寫在底下,不清楚的人可以看看
1,php開啟phpopenssl 2,在apache conf開啟rewrite莫塊 模塊(#LoadModule rewrite_module modules/mod_rewrite.so) 3,在conf文件中找到directory 把AllowOverride None 改成 AllowOverride All<Directory> ? ?Options Indexes FollowSymLinks ? ?AllowOverride All ? ?Require all granted</Directory>4,在laravel項目工程的public目錄下添加.htaccess文件 ,文件內容如下<IfModule mod_rewrite.c>Options -MultiViews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L]</IfModule>5、restart以下Apache服務器就沒問題了。