Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $params = explode('/', $_SERVER['REQUEST_URI']);
- foreach($params as $key => $param) {
- if (empty($param)) {
- unset($params[$key]);
- continue;
- }
- if (file_exists('application/class/'.$param.'.php')) {
- $controller = new $param($db);
- unset($params[$key]);
- }
- if (isset($controller)) {
- if (method_exists($controller, $param)) {
- $action = $param;
- unset($params[$key]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement