View Single Post
Old 06-14-2009, 06:40 PM   #1 (permalink)
fantomel
The Wanderer
 
Join Date: Jun 2009
Posts: 7
Thanks: 0
fantomel is on a distinguished road
Box primitive url routing

hello i'm tryign to build a routing system and i'm playing a little to understand how it works but i`ve got a debugging problem can please someone help me?

PHP Code:
$url $_SERVER['REQUEST_URI'];
$array explode("/"$url);
$action 'index';
$dispatch = new $array[1];
if(
method_exists($dispatch$action))
{
    
call_user_func_array($dispatch$action);

My Error: Catchable fatal error: Object of class Blog could not be converted to string in C:\xampp\htdocs\public\index.php on line 11
fantomel is offline  
Reply With Quote