tp5 No input file specified.


我的是windows10 系統,phpstudy 環境 ,配置的本地虛擬機,tp5.1

訪問跟目錄正常

TIM截圖20180417083736.png

訪問次級頁面報錯

TIM截圖20180417083753.png

對於 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>

 

修改完之后訪問正常

TIM截圖20180417083836.png


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM