我的是windows10 系統,phpstudy 環境 ,配置的本地虛擬機,tp5.1
訪問跟目錄正常
訪問次級頁面報錯
對於 tp5 No input file specified. 的問題,其實是 .htaccess 文件的配置問題
源文件是這樣的
<IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] </IfModule> //只需樣改成這樣 <IfModule mod_rewrite.c> Options +FollowSymlinks -Multiviews RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L] </IfModule>
修改完之后訪問正常