fantomel Posted October 8, 2009 Share Posted October 8, 2009 Hello does anyone build from scratch a url routing system? or anyone can help me understand it better because from what i found on google nothing was clearly explained to me . Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted October 8, 2009 Share Posted October 8, 2009 You'll have to clarify that. URL routing just means routing a particular URL to a particular resource. Here you go: if ($_GET['page'] == 'register') { require 'register.php'; } There is no particular way you might want to do it. It really depends on your needs and how it needs to fit into the rest of your application. Quote Link to comment Share on other sites More sharing options...
fantomel Posted October 8, 2009 Author Share Posted October 8, 2009 You'll have to clarify that. URL routing just means routing a particular URL to a particular resource. Here you go: if ($_GET['page'] == 'register') { require 'register.php'; } There is no particular way you might want to do it. It really depends on your needs and how it needs to fit into the rest of your application. Good Morning yeah i know until know i used the global $_GET var but after watching over the code ignite framework zend and others i've seen they have another option for building urls ... url segments i thinks it's called and i would i would to learn how to build a class for those type urls for the moment i've only written code for the part of requesting url and making as an array but from here on i didn't quite understand how things should connect :-? and that's why i came here maybe someone has build from scratch a similar class and point me in a direction or show me a basic example... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.