Jump to content

url routing


fantomel

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/176922-url-routing/#findComment-932845
Share on other sites

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...

Link to comment
https://forums.phpfreaks.com/topic/176922-url-routing/#findComment-932881
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.