Browse Source

但又swoole扩展时采用swoole

sunxbiao 1 year ago
parent
commit
5ea7776dc1
1 changed files with 4 additions and 0 deletions
  1. 4 0
      config/swoole.php

+ 4 - 0
config/swoole.php

@@ -2,6 +2,10 @@
2 2
 
3 3
 use think\swoole\websocket\socketio\Parser;
4 4
 
5
+if (!extension_loaded('swoole')) {
6
+    return [];
7
+}
8
+
5 9
 return [
6 10
     'server'     => [
7 11
         'host'      => env('SWOOLE_HOST', '0.0.0.0'), // 监听地址