||06-14-2009 06:40 PM
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?
$url = $_SERVER['REQUEST_URI'];
$array = explode("/", $url);
$action = 'index';
$dispatch = new $array;
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
||06-14-2009 07:45 PM
Which variable is assigned to the object (class) of
||06-14-2009 07:49 PM
You are using call_user_func_array incorrectly, when you want to call a method within an object it is used like so
Where $args would be everything after the part of the url which proclaims the action
||06-14-2009 07:58 PM
thanks enfernikus your example worked perfect
|All times are GMT. The time now is 01:21 AM.
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0