Welcome Guest, Not a member yet? Register   Sign In
php URL routing. please help me to understand.
#1

[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.
#2

[eluser]JoostV[/eluser]
You'll find more here Smile
#3

[eluser]Dam1an[/eluser]
Every one seems to be using lmgtfy now lol
#4

[eluser]FutureKing[/eluser]
[quote author="JoostV" date="1243123188"]You'll find more here Smile[/quote]

I mean if I want to create everything manually in php how will I create such type of urls like codeigniter.
#5

[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.
#6

[eluser]Colin Williams[/eluser]
LMATFY:

Code:
// $_SERVER['PATH_INFO'], in most configurations, contains the path appended to the script file name;
// You can explode this into it's segments very easily
$uri_parts = explode('/', $_SERVER['PATH_INFO']);
#7

[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!




Theme © iAndrew 2016 - Forum software by © MyBB