Example #1
0
C(\hellaEngine\Configure\Constants::PHP_PROFILE, true);
C(\hellaEngine\Configure\Constants::DEBUG_DB, true);
C(\hellaEngine\Configure\Constants::DUMP_ENABLE, true);
echo ">>>>>>>>>>>>>>>>>>>>>> begin debug info >>>>>>>>>>>>>>>>>>>>>><br>";
// 模拟数据提交
$_POST["data"] = $jsonMsg;
$output = $gateway->processMessage($jsonMsg);
if (!isset($_GET['backurl'])) {
    echo "<br><<<<<<<<<<<<<<<<<<<<<< end debug info   <<<<<<<<<<<<<<<<<<<<<<<br><br>";
    echo ">>>>>>>>>>>>>>>>>>>>>> function return >>>>>>>>>>>>>>>>>>>>>><br>";
    // $output = json_decode ( gzuncompress ( base64_decode ( $data ) ) );
    $returnmessages = \hellaEngine\Supports\Common\Util\CommonUtilMessage::decodeMessage($output);
    // _dump ( $returnmessages );
    foreach ($returnmessages as $value) {
        // _dump ( $value );
        $command = \hellaEngine\Supports\Common\Util\CommonUtilMessage::Message_getCommand($value);
        // _dump ( $command );
        util::var_dump($command, false, -1);
    }
    // _dump ( $_SERVER );
    echo "<<<<<<<<<<<<<<<<<<<<<< function return <<<<<<<<<<<<<<<<<<<<<<<br>";
    // echo (">>>>return messagelenSRC:" . strlen ( $uncompressString ) . "<br>");
    echo ">>>>return messagelenQQ:" . strlen($output) . "<br>";
    echo ">>>>return message:" . $output . "<br>";
    if (C(configure_constants::DEBUG_DB)) {
        echo ">>>>>>>>>>>>>>>>>>>>>>>dbinfo>>>>>>>>>>>>>>>>>>>>>>><br>";
        if (isset($GLOBALS[configure_constants::DEBUG_DB_DIRTY_KEY])) {
            $debugdbarray = $GLOBALS[configure_constants::DEBUG_DB_DIRTY_KEY];
            if (!is_null($debugdbarray)) {
                // _dump ( $debugdbarray );
                util::var_dump($debugdbarray, false, -1);
Example #2
0
 /**
  * 处理消息
  *
  * @param string $postData
  *            客户端传上了的 经过压缩和Base64 编码的数据
  * @return array 返回客户端的数据
  */
 public function processMessage($postData)
 {
     if (empty($postData)) {
         return "f:" . __LINE__;
     }
     // 解压缩数据
     $messagesData = CommonUtilMessage::decodeMessage($postData);
     if (is_null($messagesData)) {
         CommonUtilLog::record(CommonUtilLog::ERROR, 'processMessage', [$postData]);
         return "f:" . __LINE__;
     }
     $returnData = $this->__processMessages($messagesData);
     return $returnData;
 }