

![]() |
| ![]() | |||||||
|
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Platinum Lifetime Member | Hello, I am trying to implement router/dispatcher for my script. I looked at how phpcake, codeigniter and zend framework work but they were way to complicated to what I needed. I found a tutorial at http://www.phpaddiction.com/tags/axi...-php-part-one/ which is simple to implement. I have two types of uri: category / id / description.html or category / subcategory / id / description.html Example: /videos/funny/234/funny_monkey_dancing.html What I am trying to do is determine category and subcategory, if there is a subcategory, and then the ID. The way I am doing it right now doesn't look like the proper way. Is there a better way to do this? Here is my code from the tutorial with a few modifications. PHP Code:
__________________ Video Script - The ultimate media site script AutoVideoScript com - Run your own youtube sharing site |
| | |
| Sponsored Ads |
| | #2 (permalink) |
| www.LOL.biz Name: Daniel Last Online: Yesterday 01:16 PM iTrader: (14) Join Date: Apr 2004
Posts: 1,893
DNF$: 5,662 Location: .ro
Country: | nice hat! have you considered doing this with mod_rewrite?
__________________ Refinance Leads| |
| | |
| | #3 (permalink) |
| Platinum Lifetime Member | Thanks. I am using rewrite to redirect to default.php. I can't use static redirects because the category and subcategory can be changed.
__________________ Video Script - The ultimate media site script AutoVideoScript com - Run your own youtube sharing site |
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |