Welcome Guest, Not a member yet? Register   Sign In
URL parameters: Why difficult / impossible with CI?

I'm writing an application that must take in a few parameters from the URL. That means I must accept them as traditional name/value pairs. Example:


The end user may want to pass me a few more name/value pairs too.. but the other ones are optional.. for example:


It seems like code igniter requires me to use slash notation. What's the correct way for me to pass this stuff with CI's slash notation so that the variables are accessable by their names. For example:


Thank you!

look at CI manual for information on routing and uri class.

[eluser]Matthew Pennell[/eluser]

Quote:In some cases you might prefer to use query strings URLs:


CodeIgniter optionally supports this capability, which can be enabled in your application/config.php file. If you open your config file you'll see these items:

$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';

If you change "enable_query_strings" to TRUE this feature will become active. Your controllers and functions will then be accessible using the "trigger" words you've set to invoke your controllers and methods:


Theme © iAndrew 2016 - Forum software by © MyBB