Thinkphp5 phpstudy集成环境 param接收不了值

浏览:664 发布日期:2018/01/17 分类:ThinkPHP5专区 关键字: thinphp5,pathinfo,nginx
[code]phpstudy集成环境 thinkphp5项目无法接收param()参数值
因为pathinfo的问题 修改集成环境默认的配置文件vhosts.conf 如下


server {
listen 80;
server_name tplay.com; //站点域名
root "D:/web/tp5/tplay/public"; //项目目录
index index.php index.html index.htm;

location ~* ^.+.(jpg|jpeg|gif|css|png|js|thumb) {
expires 30d;
}
location / {
try_files $uri @default;
}

location @default {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param script_FILENAME $document_root/index.php;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param PATH_TRANSLATED $document_root/index.php;
include fastcgi_params;
}

location ~ \.php($|/) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+?\.php)(/.+)$;
fastcgi_param script_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name;
include fastcgi_params;
}

}
最佳答案
评论() 相关
后面还有条评论,点击查看>>