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

 

posted @ 2018-12-01 22:06  无色诏  阅读(1264)  评论(0编辑  收藏  举报