https://www.nginx.com/resources/wiki/start/topics/recipes/codeigniter/
location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri $uri/ /index.php;
}
這樣的環境下,在 PHP CodeIgniter 裡頭,每次想要從 $_REQUEST 取資料都會為空
<?php
print_r($_REQUEST);
解法就是將 $query_string 資訊帶入即可:
location / {
# Check if a file or directory index file exists, else route it to index.php.
try_files $uri $uri/ /index.php?$query_string;
}
沒有留言:
張貼留言