Bladeren bron

切换测试服务器

王刚 2 jaren geleden
bovenliggende
commit
d1d8aa5782
3 gewijzigde bestanden met toevoegingen van 8 en 35 verwijderingen
  1. 1 1
      Gameserver/Amfphp/Services/AppServer.php
  2. 4 4
      Gameserver/Amfphp/configs/config_and.php
  3. 3 30
      Gameserver/Amfphp/test.php

+ 1 - 1
Gameserver/Amfphp/Services/AppServer.php

@@ -42,7 +42,7 @@ class AppServer {
             Err(ErrCode::err_server_maintaining, $ssd->reason);
         }
         // todo: 检查clientVersion 判断是否应该强制升级
-        if (!Index::$isDebugging && now() - req()->ts > OFFSET_MSGTIME) {       # 如果服务端客户端时间戳超过规定误差,则消息非法
+        if (!Index::$isDebugging && abs(now() - req()->ts) > OFFSET_MSGTIME) {       # 如果服务端客户端时间戳超过规定误差,则消息非法
             return ErrCode::err_outtime;
         }
         return ErrCode::ok;                                                     # 所有检查通过

+ 4 - 4
Gameserver/Amfphp/configs/config_and.php

@@ -28,10 +28,10 @@ class config_and extends config {
      * 外网paydb
      */
     protected function _InitOuterNetPaydb() {
-        $this->paydb->host = '127.0.0.1';
+        $this->paydb->host = '172.17.16.5';
         $this->paydb->port = '3306';
         $this->paydb->name = 'ylsj2019_pay';
-        $this->paydb->user = 'root';
+        $this->paydb->user = 'ylsjMTY0LjkyLjE5NC4x';
         $this->paydb->password = 'wanggang1985';
     }
 
@@ -39,7 +39,7 @@ class config_and extends config {
      * 外网nosql
      */
     protected function _InitOuterNetNosql() {
-        $this->nosql->host = "127.0.0.1";                                       # host/ip
+        $this->nosql->host = "172.17.16.5";                                       # host/ip
         $this->nosql->port = 6379;                                              # 端口
         $this->nosql->pwd = 'wanggang1985';                                     # 密钥
     }
@@ -48,7 +48,7 @@ class config_and extends config {
      * 外网MongoDB
      */
     protected function _InitOuterMongoDB() {
-        $this->mongodb = "mongodb://ylsjMTY0LjkyLjE5NC4x:wanggang1985@localhost:23333/?authSource=ylsj2019";
+        $this->mongodb = "mongodb://ylsjMTY0LjkyLjE5NC4x:wanggang1985@172.17.16.5:23333/?authSource=ylsj2019";
     }
 
 }

+ 3 - 30
Gameserver/Amfphp/test.php

@@ -9,38 +9,11 @@ include __DIR__ . '/main.php';
 echoLine("phpver: " . PHP_VERSION . PHP_EOL);
 echoLine("tsDay:" . totalDays());
 
-//SelfChecker::CheckAll();
+SelfChecker::CheckAll();
 //
 //set_time_limit(15);                                                           # 设置执行超时时间
 //
 
-class Mock extends Object_ext {
+ 
 
-    public $Sex;
-    public $Age;
-    public $Name;
-
-}
-
-class MockB extends Object_ext {
-
-    public $Name;
-    public $Age;
-    public $Sex;
-
-}
-
-$a = JsonUtil::decode('{"Sex":"F","Age":37,"Name":"王刚"}');
-
-var_dump($a);
-var_dump(JsonUtil::encode($a));
-
-$ma = new Mock($a);
-var_dump($ma);
-var_dump(JsonUtil::encode($ma));
-var_dump($ma->MD5());
-
-$mb = new MockB($a);
-var_dump($mb);
-var_dump(JsonUtil::encode($mb));
-var_dump($mb->MD5());
+