Jump to content
Killersites Forums

karam

New Members
  • Posts

    1
  • Joined

  • Last visited

karam's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. use \com\killerphp\controllers as Controllers; $uri = strtolower($_SERVER['REQUEST_URI']); list($pfx, $controllerName,$actionName) = preg_split('/[\/\\\]/',$uri); echo $uri; switch($controllerName) { case "": case "index": $controller = new Controllers\IndexController($controllerName,$actionName); break; case "test": $controller = new Controllers\TestController($controllerName,$actionName); break; } var_dump($controller); $controller->dispatch(); output is /public/ Notice: Undefined variable: controller in C:\xampp\htdocs\public\index.php on line 35 NULL Notice: Undefined variable: controller in C:\xampp\htdocs\public\index.php on line 36 Fatal error: Call to a member function dispatch() on a non-object in C:\xampp\htdocs\public\index.php on line 36 I 'm watching kp3-setting-up-htaccess-for-controllers this video and try to do myself in window 7 laptop . my question is i save C:\xampp\htdocs\public .htaccess and show output /public/ and also undefined variable controller ?? any body guide me to solve this problem then i move foward..... advance thankx
×
×
  • Create New...