Welcome Guest, Not a member yet? Register   Sign In
Dynamic pages, best practices for routing/parsing
#6

[eluser]Unknown[/eluser]
:coolmad:

thanks Colin.

Your code very useful for me!

Code:
// All the controller
$arr_controller = array('welcome','user','blog');

list($i, $j, $check) = explode('/', $_SERVER['REQUEST_URI']);

// See if we found a match to our $langs
if (!in_array($check, $arr_controller))
{
    $route['(.*)'] = 'user/id/$1';
}

please correct my code if it wrong. thanks.


Messages In This Thread
Dynamic pages, best practices for routing/parsing - by El Forum - 08-05-2008, 03:22 AM
Dynamic pages, best practices for routing/parsing - by El Forum - 08-05-2008, 05:11 AM
Dynamic pages, best practices for routing/parsing - by El Forum - 08-05-2008, 05:23 AM
Dynamic pages, best practices for routing/parsing - by El Forum - 08-05-2008, 05:31 AM
Dynamic pages, best practices for routing/parsing - by El Forum - 08-05-2008, 05:34 AM
Dynamic pages, best practices for routing/parsing - by El Forum - 08-13-2008, 02:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB