예제 #1
0
 public function throwParseError()
 {
     $error = error_get_last();
     if ($error && in_array($error['type'], array(1, 4, 16, 64, 256, 4096, E_ALL))) {
         $error = array('code' => $error['type'], 'msg' => $error['message'], 'trace' => $error['file'] . ' In Line:' . $error['line'], 'data' => '', 'runTime' => RunTime::getTime());
         $this->pushError($error);
         $this->outputError($error);
     }
 }
예제 #2
0
파일: ApiLog.php 프로젝트: tianyunchong/php
 /**
  * 统计系统写日志方法
  * @param array $request 请求信息(二维数组) array('time'=>'','type'=>'',array('url'=>'','event'=>'','runTime'=>'','realTime'=>'','status'=>''))
  * @param [type] $result  [description]
  */
 public static function addStatLog($request)
 {
     $data = $request['data'];
     $data['time'] = $request['time'];
     $data['type'] = $request['type'];
     self::$loglist['stats'][] = $data;
     self::$loglist['runTime'] = RunTime::getTime();
     return true;
 }