thinkphp上传到nginx服务器不能使用pathinfo模式访问,怎么决解?

「已注销」 2016-12-10 10:17:53
nginx版本1.10.1,远程ip访问。
...全文
726 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
果酱很好吃 2016-12-12
  • 打赏
  • 举报
回复
nginx 1.8,1.10 没试过,应该可以

location ~ [^/]\.php(/|$)
        {
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;
			set $path_info $fastcgi_path_info;
			fastcgi_param PATH_INFO       $path_info;
			try_files $fastcgi_script_name =404;
        }
「已注销」 2016-12-10
  • 打赏
  • 举报
回复
引用 1楼的地方地方地方 的回复:
和nginx没关系吧,你开启tp的debug模式或是请空下runtime缓存
nginx就是默认不支持pathinfo的
  • 打赏
  • 举报
回复
和nginx没关系吧,你开启tp的debug模式或是请空下runtime缓存
  • 打赏
  • 举报
回复
和nginx没关系吧,你开启tp的debug模式或是请空下runtime缓存

4,251

社区成员

发帖
与我相关
我的任务
社区描述
国内外优秀PHP框架讨论学习
社区管理员
  • Framework
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧