tp5.1路由報錯No input file specified.


問題:

  按照官方教安裝了框架,打開首頁沒問題,可是安裝教程路由規則打開 "http://127.0.0.1/hello/2" 時,

卻報錯誤  "No input file specified."

解決方案(2選一):

  1.修改 public/.htaccess文件為:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
 
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>

  2. PHP版本5.6以上都會出現這個問題  把php版本改為5.5就OK

 


免責聲明!

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



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