您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

ngnix - php取不到$_GET的值是怎么回事?

2024/4/28 14:19:52发布27次查看
在本机开发时是没有异常的,部署到服务器就各种问题了,request_uri的参数明明是有值的,但是query_string却是空的...orz
在本机开发时是用apache,部署是用ngnix难道和配置有关?
array:32 [▼ user => www-data home => /var/www fcgi_role => responder query_string => request_method => get content_type => content_length => script_filename => /home/ubuntu/mfphp/index.php script_name => /index.php request_uri => /index/test/?id=3&page=1&size=10 document_uri => /index.php document_root => /home/ubuntu/mfphp server_protocol => http/1.1 gateway_interface => cgi/1.1 server_software => nginx/1.4.6 remote_addr => 223.73.98.45 remote_port => 23487 server_addr => 10.104.44.175 server_port => 80 server_name => gb.qiangtaoli.com redirect_status => 200 http_host => gb.qiangtaoli.com http_connection => keep-alive http_cache_control => max-age=0 http_upgrade_insecure_requests => 1 http_user_agent => mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 http_accept => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 http_accept_encoding => gzip, deflate, sdch http_accept_language => zh-cn,zh;q=0.8,en;q=0.6,zh-tw;q=0.4 php_self => /index.php request_time_float => 1472734757.8597 request_time => 1472734757]

回复内容: 在本机开发时是没有异常的,部署到服务器就各种问题了,request_uri的参数明明是有值的,但是query_string却是空的...orz
在本机开发时是用apache,部署是用ngnix难道和配置有关?
array:32 [▼ user => www-data home => /var/www fcgi_role => responder query_string => request_method => get content_type => content_length => script_filename => /home/ubuntu/mfphp/index.php script_name => /index.php request_uri => /index/test/?id=3&page=1&size=10 document_uri => /index.php document_root => /home/ubuntu/mfphp server_protocol => http/1.1 gateway_interface => cgi/1.1 server_software => nginx/1.4.6 remote_addr => 223.73.98.45 remote_port => 23487 server_addr => 10.104.44.175 server_port => 80 server_name => gb.qiangtaoli.com redirect_status => 200 http_host => gb.qiangtaoli.com http_connection => keep-alive http_cache_control => max-age=0 http_upgrade_insecure_requests => 1 http_user_agent => mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, like gecko) chrome/52.0.2743.116 safari/537.36 http_accept => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 http_accept_encoding => gzip, deflate, sdch http_accept_language => zh-cn,zh;q=0.8,en;q=0.6,zh-tw;q=0.4 php_self => /index.php request_time_float => 1472734757.8597 request_time => 1472734757]

phpinfo();
看看是否有value
在看看php.ini 中:variables_order 的值。 修改成为这样就ok了
variables_order=egpcs
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product