Laravel 5.2,Input :: all()为空

时间:2016-01-29 14:42:34

标签: php laravel-5 laravel-5.2

我有奇怪的问题。在localhost上一切都很好。但是在我的生产网站上,函数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;
}   

}

2 个答案:

答案 0 :(得分:0)

谢谢,求助。

应该是。

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

在nginx配置文件中

答案 1 :(得分:0)

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

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

这很重要- $ query_string

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

相关问题