tp5.1路由报错No input file specified.

按照官方教安装了框架,打开首页没问题,可是安装教程路由规则打开 "http://www.xxxx.com/admin/index/index" 时,却报错误  "No input file specified."

解决方法一:

与php版本有关  PHP版本5.6以上都会出现这个问题  把php版本改为5.5就OK

 解决方法二:

修改.htaccess文件中的RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]

修改成RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]

路径 :public.htaccess.php中配置

官方文件:https://www.kancloud.cn/manual/thinkphp5_1/353955

原文地址:https://www.cnblogs.com/lsyy/p/10830295.html