php URL routing. please help me to understand. |
[eluser]FutureKing[/eluser]
I have seen that codeigniter's urls look like this http://somesite.com/index.php/classname/...ame/value/ I am not expert in php. But I want to know that how to utilize the values after index.php. Please help.
[eluser]FutureKing[/eluser]
[quote author="JoostV" date="1243123188"]You'll find more here [/quote] I mean if I want to create everything manually in php how will I create such type of urls like codeigniter.
[eluser]Natebot[/eluser]
FutureKing, Take a look at the source of CI_URI and CI_Router in system/libraries/URI.php and system/libraries/Router.php for how Codeigniter detects the URI string and uses it for routing, in particular the private functions. Then look at system/codeigniter/codeigniter.php for the client code that uses those classes to load controllers ,etc.
[eluser]Colin Williams[/eluser]
LMATFY: Code: // $_SERVER['PATH_INFO'], in most configurations, contains the path appended to the script file name;
[eluser]FutureKing[/eluser]
[quote author="Natebot" date="1243127275"]FutureKing, Take a look at the source of CI_URI and CI_Router in system/libraries/URI.php and system/libraries/Router.php for how Codeigniter detects the URI string and uses it for routing, in particular the private functions. Then look at system/codeigniter/codeigniter.php for the client code that uses those classes to load controllers ,etc.[/quote] THANKS! |
Welcome Guest, Not a member yet? Register Sign In |