12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
- namespace fcgisrv;
- require_once(BASE_HELPER_PATH . '/fcgisrv/BaseServer.php');
- require_once(BASE_ROOT_PATH . '/helper/area_helper.php');
- require_once(BASE_CORE_PATH . '/framework/function/http.php');
- require_once(BASE_ROOT_PATH . '/helper/session_helper.php');
- require_once(BASE_ROOT_PATH . '/helper/sensitive_word/dfa.php');
- require_once(BASE_ROOT_PATH . '/helper/exceptionex.php');
- require_once(BASE_PATH . '/control/merchant.php');
- use Log;
- use Base;
- use UnSignException;
- use Exception;
- use merchantControl;
- use errcode;
- class RAccServer extends BaseServer
- {
- public function __construct($subPath)
- {
- parent::__construct($subPath);
- }
- static private $stInstance = NULL;
- static public function instance()
- {
- if(self::$stInstance == NULL) {
- self::$stInstance = new RAccServer('racc');
- }
- return self::$stInstance;
- }
- function handle_req($file)
- {
- try
- {
- if(file_exists($file))
- {
- if($this->is_exclude($file)) {
- Log::record("Call {$file}",Log::DEBUG);
- include $file;
- } else {
- Base::mobile_control();
- }
- }
- else
- {
- fcgi_header("Content-Type: text/html; charset=UTF-8");
- echo "no such file.";
- }
- }
- catch (UnSignException $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);
- }
- }
- }
|