Laravel 5.2, Input::all() is empty


Laravel 5.2, Input::all() is empty

我有奇怪的问题。在本地主机上,一切都很好。但是在我的生产网站上,函数Input::all()返回空数组。

例如http:://mypage.com?action=run等。

nginx配置

    server {
root /usr/share/nginx/www/g2g/public;
index index.html index.htm index.php;
server_name mypage.com www.mypage.com;
location / { 
    try_files $uri $uri/ /index.html /index.php;
}   
location ~ '.php$ {
    fastcgi_split_path_info ^(.+'.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
}   

}

谢谢,帮助。

应该是。

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

在 nginx 配置文件中

在nginx配置中,应该是这个。

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

这很重要 - $query_字符串

希望对节省时间有很大帮助。