hxp
2025-06-09 6c3f6335c70859ded94a1ad8d218acb0ac34239c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
include_once "../../../Common/CommFunc.php";
include_once "../../../Common/Logging.php";
include_once '../../../Common/MongoDB7.php';
include_once "GamePlayer.php";
include_once "errorCode.php";
 
\Logging\CreateLogging("syncServerDataToLocal.php");
 
$code = $_GET['code'];
$openid = $_GET['openid'];
$gamename = $_GET['gamename'];
\Logging\LogInfo('_GET: ' . print_r($_GET, true));
 
// 验证权限等...
 
$gameconfig = parse_ini_file("config/" . $gamename . ".ini", true);
$gamePlayer = new GamePlayer($openid, $gameconfig["db"]);
$playerData = $gamePlayer->getSyncPlayerData($syncData);
\Logging\LogInfo('playerData: ' . print_r($playerData, true));
$ret = ErrorCode::retOK($playerData);
echo json_encode($ret);