Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require __DIR__ . '/App/autoload.php';
- if ('admin' == $_GET['ctrl']) {
- $class = '\App\Controllers\Admin\Index';
- $action = $_GET['act'] ?? 'all';
- } else {
- $ctrl = $_GET['ctrl'] ?? 'Index';
- $class = '\App\Controllers\\' . $ctrl;
- $action = $_GET['act'] ?? 'handle';
- }
- $ctrl = new $class;
- $ctrl->action($action);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement