Welcome Guest, Not a member yet? Register   Sign In
The Router Issue
#1

Dear all,

I have a probelm during development with CI 3.0.0.

In config.php, if I set $config['enable_query_strings'] = TRUE; when I visit my index page that is in localhost website(http://huo.zaiwai.com/vote/) , it has the error:
Unable to determine what should be displayed. A default route has not been specified in the routing file.

But when I set  $config['enable_query_strings'] = FALSE, the problem is resolved however I can't pass the parameter with url.

So how can I resolve this?

Thank you

BR.
Reply
#2

First, you probably need to review the docs for the enable_query_strings setting:
http://www.codeigniter.com/user_guide/ge...ry-strings

So, if you have it set to TRUE, your URL would look something like http://huo.zaiwai.com/index.php?c=vote

If you set it to FALSE, you can pass parameters as segments of the URL, rather than using query strings. The page which documents the enable_query_strings setting also goes into a little information about this, but the documentation on Controllers goes into further detail: http://www.codeigniter.com/user_guide/ge...ur-methods
Reply




Theme © iAndrew 2016 - Forum software by © MyBB