Advertisement
Guest User

Untitled

a guest
Apr 25th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. <?php
  2.  
  3. require __DIR__ . '/App/autoload.php';
  4.  
  5. if ('admin' == $_GET['ctrl']) {
  6.     $class = '\App\Controllers\Admin\Index';
  7.     $action = $_GET['act'] ?? 'all';
  8. } else {
  9.     $ctrl = $_GET['ctrl'] ?? 'Index';
  10.     $class = '\App\Controllers\\' . $ctrl;
  11.     $action = $_GET['act'] ?? 'handle';
  12. }
  13.  
  14. $ctrl = new $class;
  15. $ctrl->action($action);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement