setExFiles($exfiles); } protected function is_exclude($file) { $exister = function ($file,$subex) { $path = BASE_ROOT_PATH . "/" . $this->mSubPath . "/{$subex}"; $basename = basename($file); $tmp = "{$path}/{$basename}"; return file_exists($tmp); }; $ret = parent::is_exclude($file); if ($ret) { return true; } elseif ($exister($file,'callback')) { return true; } elseif ($exister($file,'bridge')) { return true; } else { return false; } } protected function preLooper() { parent::preLooper(); DFAFilter::instance(); area_helper::instance(); } public function handle_req($file) { try { fcgi_header("Content-Type: text/html; charset=UTF-8"); if(file_exists($file)) { if($this->is_exclude($file)) { Log::record("Call {$file}",Log::DEBUG); include $file; } elseif(defined('COMPANY_NAME') && COMPANY_NAME === 'XYZ_COMPANY') { //部分控制器不需要使用session. $act = $_GET['act']; if ($act == 'refill') { Base::mobile_control(); } else { echo "no such file."; } session::instance()->end(false); } 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. $act = $_GET['act']; if($act != 'refill') { session::instance()->start(); Log::record("member_id=" . session_helper::memberid(),Log::DEBUG); } Base::mobile_control(); session::instance()->end(true); } } else { Log::record("Can Not call file: {$file}",Log::DEBUG); echo "no such file."; } } catch (UnloginException $ex) { mobileControl::outerr(errcode::ErrUnLogin,errcode::msg(errcode::ErrUnLogin),'','android'); } catch (Exception $ex) { mobileControl::outerr($ex->getCode(),$ex->getMessage(),'','android'); Log::record("run_looper exception catch code={$ex->getCode()} msg={$ex->getMessage()} trace={$ex->getTraceAsString()}",Log::ERR); } } }