Welcome Guest, Not a member yet? Register   Sign In
i can`t pass parameter on uri by get method
#1

[eluser]minhbu[/eluser]
i edited config.php
$config['enable_query_strings'] = TRUE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd'; // experimental not currently in use
but when i write this uri on browse then i get a error message
http://localhost/ci/admin/controller/met...rname=demo

404 Page Not Found

The page you requested was not found.

but when i add a parameter is good
http://localhost/ci/admin/controller/met...emo&ok=yes
how should i do ?
i want to pass a paramter on uri
#2

[eluser]Maglok[/eluser]
Well the proper way of passing a parameter is different in CI. To quote the user_guide:

Quote:The segments in the URL, in following with the Model-View-Controller approach, usually represent:

example.com/class/function/ID

1.The first segment represents the controller class that should be invoked.
2.The second segment represents the class function, or method, that should be called.
3.The third, and any additional segments, represent the ID and any variables that will be passed to the controller.
The URI Class and the URL Helper contain functions that make it easy to work with your URI data. In addition, your URLs can be remapped using the URI Routing feature for more flexibility.

Source: http://ellislab.com/codeigniter/user-gui.../urls.html

So you could use: http://localhost/ci/admin/controller/met...ername/ok/


That said it could be your suffix?




Theme © iAndrew 2016 - Forum software by © MyBB