示例#1
0
 private static function runController()
 {
     $isAjax = Request::isAjax();
     if ($isAjax) {
         Autoload::includePath('mvc' . SEPARATOR . 'controller' . SEPARATOR . 'ajax');
     } else {
         Autoload::includePath('mvc' . SEPARATOR . 'controller' . SEPARATOR . 'web');
     }
     Layout::loadContent();
     $controller = Request::getController();
     $controller .= '_controller';
     if (class_exists($controller)) {
         $app = new $controller();
     } else {
         Request::redirect('notfound');
     }
     $app = null;
 }