mixing URI query and URI Segment |
[eluser]tominku[/eluser]
CI's uri convention is class/function/parameter1/parameter2 but is it possible to use like this? http://my_site.com/index.php/blog/write/...&memo=blah but it wasn't work.. i saw "invalid URI" message in fact, it is inconvenient to just depend on the sequence of parameter like this URI: blog/write/kang/hi/blah USAGE: Code: class Blog extends Controller{
[eluser]xwero[/eluser]
you can do http://my_site.com/index.php/blog/write/.../memo/blah. But i hope you understand the limits of the query string approach. Those values you attach to the url should be posted. Said that you can extract the url as follows Code: $params = $this->uri->uri_to_assoc(3);
[eluser]tominku[/eluser]
so... is it possible to use like this? http://my_site.com/index.php/blog/write/...&memo=blah it brings out the message "The URI you submitted has disallowed characters."
[eluser]xwero[/eluser]
I think it works if you do http://my_site.com/index.php/blog/write/...&memo=blah and set the enable_query_string to true in the config file. But then you have to get the values using $_GET['name'] or $this->input->get('name')
[eluser]tominku[/eluser]
thank you very much! i set enable_query_string to true, then it works! but there is some bug.. http://localhost:8888/codeigniter/index....subject=hi it works. but... http://localhost:8888/codeigniter/index....?name=kang (bring out the message "The page you requested was not found.") i think the number of parameters should be at least two..
[eluser]xwero[/eluser]
Yes you are right that is because of following code in the _fetch_uri_string in the uri library Code: if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
[eluser]Jonathon Hill[/eluser]
So is this a bug? Code: // If the URL has a question mark then it's simplest to just Since when does $_GET contain the URI string?? This doesn't appear to work at all - is it a bug? What am I missing? |
Welcome Guest, Not a member yet? Register Sign In |