开发者

code igniter :: $_GET?

In my projects i often use get params as a temporary way to test things with different values.开发者_开发问答

However it seems like you cannot access get params in code igniter?

I am aware I could build a param into my functions and pass the value as a url segment.

But i dont want to be doing that every time I wish to test something.

So,

is there any way to use get values in CI?


You can parse $_SERVER['QUERY_STRING'] and set it as $_GET:

parse_str($_SERVER['QUERY_STRING'], $_GET);


You can enable query strings in your config file. Find this.

$config['enable_query_strings'] = FALSE;

and change it to true.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜