安装ThinkPHP5.0.7版本运行项目域名http://test.lo时提示安装ThinkPHP成功,但是运行http://test.lo/index/index时提示:
1 | No input file specified |
上网查了一下才知道,PHP5.6以上的是fast_cgi模式,而在某些情况下,不能正确识别path_info所造成的错误,这个时候,你只需要更改.htaccess文件,如下所示:
1 | <IfModule mod_rewrite.c> |
只需要在index.php后面添加?即可,如下所示:
1 | <IfModule mod_rewrite.c> |
再次运行http://test.lo/index/index成功了。