And the last lesson of codeigniter URLs is Enabling
Query Strings, in some cases you might prefer to use query strings URLs like
this index.php?c=products&m=view&id=345.
Codeigniter optionally supports this capability, which can be enabled in your application/config.php file. Codeigniter php frameworks will be show you the config file
preview. The preview will be like this.
$config['enable_query_strings'] =
FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$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 like this index.php?c=controller&m=method.
I think enough for this post of codeigniter URLs, see you in the next post in Codeigniter
php frameworks.
Please note this, If you are using query
strings you will have to build your own URLs, rather than utilizing the URL
helpers (and other helpers that generate URLs, like some of the form helpers)
as these are designed to work with segment based URLs.
This post of Codeigniter php frameworks:
codeigniter URLs part 2 is references from
http://codeigniter.com/user_guide/general/urls.html.
No comments:
Post a Comment