setExFiles([]); } protected function preLooper() { parent::preLooper(); DFAFilter::instance(); area_helper::instance(); } public function handle_req($file) { try { if(file_exists($file)) { if(defined('CROSS_DOAMIN') && CROSS_DOAMIN == true) { $host = 'http://192.168.1.218:3333'; fcgi_header("Access-Control-Allow-Headers:DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type, Accept-Language, Origin, Accept-Encoding"); fcgi_header("Content-Type: text/html; charset=UTF-8"); fcgi_header("Access-Control-Allow-Credentials: true"); fcgi_header("Access-Control-Allow-Origin: {$host}"); fcgi_header('Access-Control-Allow-Methods: GET, POST, PUT,DELETE,PATCH'); } if($this->is_exclude($file)) { include $file; } else { if(!isset($_GET['act'])) { $_GET['act'] = 'index'; } if(!isset($_GET['op'])) { $_GET['op'] = 'index'; } if(!isset($_POST['act'])) { $_POST['act'] = 'index'; } if(!isset($_POST['op'])) { $_POST['op'] = 'index'; } //部分控制器不需要使用session. session::instance()->start(); Base::mobile_control(); } } else { Log::record("Can Not call file: {$file}",Log::DEBUG); fcgi_header("Content-Type: text/html; charset=UTF-8"); echo "no such file."; } } catch (UnloginException $ex) { merchantControl::outerr(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin)); } catch (Exception $ex) { merchantControl::outerr($ex->getCode(),$ex->getMessage()); Log::record("run_looper exception catch code={$ex->getCode()} msg={$ex->getMessage()} trace={$ex->getTraceAsString()}",Log::ERR); } session::instance()->end(); } }