lnmp 一件安装包PATH_INFO 为空 (急急急),求解救
网上各种办法都试了 ,就变量, 就是值为空,求大神指教。打印$_SERVER显示如下
Array
(
=> www
=> /home/www
=> RESPONDER
=> CGI/1.1
=> nginx/1.2.7
=> step=2
=> GET
=>
=>
=> /home/www/php/cjw/index.php
=> /index.php
=> /maccount/m_safe?step=2
=> /index.php
=> /home/www/php/cjw
=> HTTP/1.1
=> 192.168.0.23
=> 49862
=> 192.168.0.107
=> 80
=> www.cjwt.com
=> 200
=>
=> www.cjwt.com
=> Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0
=> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
=> zh-cn,zh;q=0.8,en-us;q=0.5,en;q=0.3
=> gzip, deflate
=> http://www.cjwt.com/member/member
=> Hm_lvt_b2e3367648119e6498da6945cb6fbd04=1397626406,1397697060; bdshare_firstime=1397644620419; cjw_front_sessions=KI7SgBE05F5%2BBqgRNej6%2B%2BcGKlrsCU3cCpvklzJc7tfVcPlJ4nqzfmFMrem7YSU3kmg1bXLkQAlorFcjlVEOvY1O8OosLOCrSVsibAHPVxMIKzi7sxecQEPYQ2mT3%2F81ejBNkdlr6XPyqR6tGDNO3Z2GO9nZAF60HZRIJNnd43SZnl9cnJRroH59AB646tf9r16SWCoKVL%2B6KnJSR9uq5Uspcu8pMWzXkUPhIgWFZ27zKacJK8q1RbWRK8zpcMd33D%2FsO2W%2F6LROzQbTWcPbDkbHOCkzMBDWcxXDVbo4awPKMOEVI1QHLycTirqrlh4sxcPETNStDYkZrR0w9%2BPxazLE09BJtFN8mCRLz%2FWe8BNoIXBME9iFAZHXClhkjZc2; Hm_lpvt_b2e3367648119e6498da6945cb6fbd04=1397697075
=> keep-alive
=> no-cache
=> no-cache
=> /index.php
=> 1397697733
) :(大神们,帮忙看看吧 。我直接是server里面配置的写过了 。fcgi 配置也写过了, fastcgi_params 也写了 。每个都不行,就只有那个变量,但是变量没有值, 甚至直接把变量值写成死数据,打印出来依然是空 https://bbs.vpser.net/viewthread.php?tid=10068&page=1&fromuid=3#pid29934 谢谢军哥的解答, 但是还是不行。我直接写成死数据都不行
fcgi.conf文件配置如下, 其他的都能获得
fastcgi_param PATH_INFO "adfasfdasdf";
fastcgi_paramGATEWAY_INTERFACECGI/1.1;
fastcgi_paramSERVER_SOFTWARE nginx/$nginx_version;
fastcgi_paramQUERY_STRING $query_string;
fastcgi_paramREQUEST_METHOD $request_method;
fastcgi_paramCONTENT_TYPE $content_type;
fastcgi_paramCONTENT_LENGTH $content_length;
fastcgi_paramSCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_paramSCRIPT_NAME $fastcgi_script_name;
fastcgi_paramREQUEST_URI $request_uri;
fastcgi_paramDOCUMENT_URI $document_uri;
fastcgi_paramDOCUMENT_ROOT $document_root;
fastcgi_paramSERVER_PROTOCOL $server_protocol;
fastcgi_paramREMOTE_ADDR $remote_addr;
fastcgi_paramREMOTE_PORT $remote_port;
fastcgi_paramSERVER_ADDR $server_addr;
fastcgi_paramSERVER_PORT $server_port;
fastcgi_paramSERVER_NAME $server_name;
回复 3# 的帖子
军哥。还是不行啊 配置如下, 麻烦在帮忙看看,谢谢fcgi.conf 配置
fastcgi_param PATH_INFO "adfasfdasdf";
fastcgi_paramGATEWAY_INTERFACECGI/1.1;
fastcgi_paramSERVER_SOFTWARE nginx/$nginx_version;
fastcgi_paramQUERY_STRING $query_string;
fastcgi_paramREQUEST_METHOD $request_method;
fastcgi_paramCONTENT_TYPE $content_type;
fastcgi_paramCONTENT_LENGTH $content_length;
fastcgi_paramSCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_paramSCRIPT_NAME $fastcgi_script_name;
fastcgi_paramREQUEST_URI $request_uri;
fastcgi_paramDOCUMENT_URI $document_uri;
fastcgi_paramDOCUMENT_ROOT $document_root;
fastcgi_paramSERVER_PROTOCOL $server_protocol;
fastcgi_paramREMOTE_ADDR $remote_addr;
fastcgi_paramREMOTE_PORT $remote_port;
fastcgi_paramSERVER_ADDR $server_addr;
fastcgi_paramSERVER_PORT $server_port;
fastcgi_paramSERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_paramREDIRECT_STATUS 200;
nginx.conf配置
server
{
listen 80;
server_name www.cjwt.com;
index index.html index.htm index.php;
root/home/www/php/cjw;
location / {
if (!-e $request_filename) {
rewrite^(.*)$/index.php?s=$1last;
break;
}
}
location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_passunix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}
} 你配置里没include pathinfo.conf;啊
页:
[1]