CodeIgniter : No input file specified : PATH_INFO : $_GET
when I use:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|favicon\.ico|robots\.txt|class|style|js)
RewriteRule ^(.*)$ /index.php/$1 [L]
in .htaccess and:
$config['uri_protocol'] = "PATH_INFO";
in config.php the result is: MY WINDOWS SERVER says: everything OK and MY LINUX SERVER says No input file specified
so I change .htaccess that way:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|favicon\.ico|robots\.txt|class|style|js)
RewriteRule ^(.*)$ /index.php?/$1 [L]
and in confi开发者_运维技巧g.php:
$config['uri_protocol'] = "QUERY_STRING";
than: everything works BUT $_GET not!!! how can I use $_GET with such settings? simple:
parse_str($_SERVER['QUERY_STRING'], $_GET);
doesn't work now
solved... I used this:
$ru = $_SERVER['REQUEST_URI'];
parse_str(substr($ru,strpos($ru,'?')+1), $_GET);
now I can use $_GET again
You are probably using fastcgi PHP which means you should take a look at CI's user guide for troubleshooting: http://codeigniter.com/user_guide/installation/troubleshooting.html
-- EDIT --
I misunderstood the question. Enabling querystrings should be done through the CI config. Look at the bottom of this user guide page: http://codeigniter.com/user_guide/general/urls.html
Upgrade to CodeIgniter Reactor 2.0, $_GET works on most installations. 2.0.1 will be out this week which has even better support.
精彩评论