V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
s609926202
V2EX  ›  问与答

Thinkphp3.2.3 pathinfo 开启见鬼了。。。

  •  
  •   s609926202 · 2017-07-21 01:13:23 +08:00 · 1861 次点击
    这是一个创建于 2498 天前的主题,其中的信息可能已经有所发展或是发生改变。

    thinkPHP 3.2.3 的框架 开启 pathinfo 模式 框架 U 方法取到的地址 居然没有 index
    正确的 /index.php/Home/Index/index 现在错误的 .php/Home/Index/index 也是见鬼了 这到底是框架问题 还是 nginx 配置问题啊

    贴配置, pathinfo:

    fastcgi_split_path_info ^(.+?.php)(/.*)$; set $path_info $fastcgi_path_info; fastcgi_param PATH_INFO $path_info; try_files $fastcgi_script_name =404;

    站点配置文件 site.conf

    location ~ [^/].php(/|$) { fastcgi_pass unix:/tmp/php-cgi5.4.sock; fastcgi_index index.php; include fastcgi.conf; include pathinfo.conf; }

    4 条回复    2017-07-21 17:53:47 +08:00
    mokeyjay
        1
    mokeyjay  
       2017-07-21 08:41:11 +08:00 via Android
    新项目还用 3.x ?
    nieyujiang
        2
    nieyujiang  
       2017-07-21 09:00:49 +08:00
    大军还有 30s 到达战场.
    s609926202
        3
    s609926202  
    OP
       2017-07-21 09:35:26 +08:00
    @mokeyjay 一言难尽,,
    zwl2012
        4
    zwl2012  
       2017-07-21 17:53:47 +08:00 via iPhone
    哥们这是 URLRewrite 配置问题吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2712 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:10 · PVG 23:10 · LAX 08:10 · JFK 11:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.