在配置Phalcon 的时候,配置的使用是:
server { listen 80; server_name localhost.dev; index index.php index.html index.htm; set $root_path ‘/var/www/phalcon/public‘; root $root_path; location / { try_files $uri $uri/ /index.php; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { root $root_path; } location ~ /\.ht { deny all; } }
发现PHP无法获取$_GET信息。
将
try_files $uri $uri/ /index.php;
改为
try_files $uri $uri/ /index.php?$query_string;
即可解决
时间: 2024-11-07 11:42:08