kxhdyx 发表于 2017-12-17 21:56:42

紧急求助无法获取到$_POST的数据

用的是Ubuntu下安装php7.1加nginx,现在一直无法获取到$_POST数据,使用$rest_json = file_get_contents("php://input");的方式也获取不到,get的能正常获取,求问到底是哪里有问题呀nginx配置是这样的:
server {
    listen 80 default_server;
    listen [::]:80 ipv6only=on default_server;

    root /var/www/sihuo;
    index index.php index.html index.htm;

    server_name _;

    location / {
      try_files $uri $uri/ /index.php?$query_string;
    }   

    location /resources {
      root /var/www/sihuo/views;
    }   
    location ~* \.php$ {
      include snippets/fastcgi-php.conf;
      fastcgi_pass 127.0.0.1:9000;
    }   
}


php.ini中相关的enable_post_data_reading=On,post_max_size = 8M request_order = "GP" variables_order = "GPCS"


求问大神们是哪里有问题啊,要崩溃了,各种Google到的方法都不好使不起作用。
页: [1]
查看完整版本: 紧急求助无法获取到$_POST的数据