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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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