xy 3 weeks ago
parent
commit
9cf7177efd
2 changed files with 2 additions and 2 deletions
  1. 1 1
      main.php
  2. 1 1
      src/GameClient.php

+ 1 - 1
main.php

@@ -1,6 +1,6 @@
 <?php
 
-use GameClient;
+use App\GameClient;
 class ProgramMain {
     private static ?GameClient $client = null;
     

+ 1 - 1
src/client.php → src/GameClient.php

@@ -1,4 +1,5 @@
 <?php
+namespace App;  // 添加命名空间
 require __DIR__.'/../generated/vendor/autoload.php';
 require_once __DIR__ . '/../vendor/autoload.php';
 require_once './msg.php';
@@ -11,7 +12,6 @@ use Common_pack\ResHeartBeat;
 use Common_pack\ResLogin;
 use Google\Protobuf\Internal\Message;
 
-
 class GameClient {
     private ?WebSocketClient $client = null;
     private ?string $userId = null;