Welcome Guest, Not a member yet? Register   Sign In
URI Routing Like Wordpress Pages and Posts
#6

[eluser]cornofstarch[/eluser]
Hi,

I'm trying this method but I'm having trouble with the remap...

Code:
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class Pages extends MX_Controller
{

    function __construct()
    {
        parent::__construct();
    }

    function _remap($method, $params = array())
    {
        print $method;
        
        if(empty($params))
        {
            print " empty";
        }
        
        foreach($params as $param)
        {
            print $param . "<br />";
        }
    }
}

?&gt;

I keep getting "index" for $method and $params[] is always empty. For example, http://localhost/test/wow/again will result in the following output:

index empty

I'm trying to get the following output:

test wow
again

What am I doing wrong with the remap?


Messages In This Thread
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-21-2011, 02:01 AM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-21-2011, 03:57 AM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-21-2011, 05:24 AM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-21-2011, 12:13 PM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-21-2011, 10:57 PM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-22-2011, 06:31 PM
URI Routing Like Wordpress Pages and Posts - by El Forum - 01-24-2011, 02:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB