Esempio n. 1
0
 /**
  * 引入控制器文件
  * @param  [str] $ctrl 控制器名称字符串
  * @return [type]       [description]
  */
 private static function includectrl($ctrl)
 {
     $class_name = $ctrl . "_ctrl";
     $filename = WEB_ROOT . "ctrl/{$class_name}.class.php";
     include $filename;
     if (class_exists($class_name)) {
         self::$ctrl = new $class_name();
     } else {
         exit("Controller class {$class_name} not found!");
     }
     return true;
 }
Esempio n. 2
0
 public static function setCtrl($class)
 {
     self::$ctrl = $class;
 }