我在使用Nginx+php基于ThinkPHP学习时,基于PATHINFO访问直接出现404错误,原来是Nginx不支持。下面分享一下解决方式ThinkPHP采用单一入口模式访问应用,下面的访问是等效的:http://serverName/...
location ~ .+\.php($|/){ #root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME D:/www$fastcgi_script_name; include fastcgi_params; }