{"id":1072,"date":"2025-01-19T13:52:04","date_gmt":"2025-01-19T05:52:04","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=1072"},"modified":"2025-01-19T13:52:04","modified_gmt":"2025-01-19T05:52:04","slug":"swoole-%e4%b8%8e%e6%95%b0%e6%8d%ae%e5%ba%93%e9%9b%86%e6%88%90%e6%8c%87%e5%8d%97%ef%bc%9a%e6%8f%90%e5%8d%87%e6%95%b0%e6%8d%ae%e5%ba%93%e6%80%a7%e8%83%bd%e4%b8%8e%e5%b9%b6%e5%8f%91%e5%a4%84%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/01\/19\/swoole-%e4%b8%8e%e6%95%b0%e6%8d%ae%e5%ba%93%e9%9b%86%e6%88%90%e6%8c%87%e5%8d%97%ef%bc%9a%e6%8f%90%e5%8d%87%e6%95%b0%e6%8d%ae%e5%ba%93%e6%80%a7%e8%83%bd%e4%b8%8e%e5%b9%b6%e5%8f%91%e5%a4%84%e7%90%86\/","title":{"rendered":"Swoole \u4e0e\u6570\u636e\u5e93\u96c6\u6210\u6307\u5357\uff1a\u63d0\u5347\u6570\u636e\u5e93\u6027\u80fd\u4e0e\u5e76\u53d1\u5904\u7406\u80fd\u529b"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Swoole \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u534f\u7a0b\u652f\u6301\u548c\u9ad8\u6548\u7684\u5f02\u6b65 I\/O \u7279\u6027\uff0c\u4f7f\u5176\u80fd\u591f\u4e0e\u591a\u79cd\u6570\u636e\u5e93\u8fdb\u884c\u9ad8\u6548\u96c6\u6210\u3002\u5728\u4f20\u7edf\u7684 PHP \u4e2d\uff0c\u6570\u636e\u5e93\u64cd\u4f5c\u5f80\u5f80\u662f\u963b\u585e\u7684\uff0c\u8fd9\u4f1a\u5bfc\u81f4\u6027\u80fd\u74f6\u9888\u3002\u800c\u5728 Swoole \u4e2d\uff0c\u901a\u8fc7\u534f\u7a0b\u548c\u5f02\u6b65\u673a\u5236\uff0c\u53ef\u4ee5\u5728\u4e0d\u963b\u585e\u4e3b\u8fdb\u7a0b\u7684\u60c5\u51b5\u4e0b\u9ad8\u6548\u5730\u6267\u884c\u6570\u636e\u5e93\u67e5\u8be2\uff0c\u5927\u5927\u63d0\u9ad8\u7cfb\u7edf\u7684\u541e\u5410\u91cf\u548c\u54cd\u5e94\u901f\u5ea6\u3002<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u662f Swoole \u4e0e\u5e38\u89c1\u6570\u636e\u5e93\uff08\u5982 MySQL\u3001PostgreSQL \u548c Redis\uff09\u7684\u96c6\u6210\u65b9\u5f0f\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. <strong>Swoole \u4e0e MySQL \u96c6\u6210<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u63d0\u4f9b\u4e86 <code>Swoole\\Coroutine\\Mysql<\/code> \u7c7b\u6765\u652f\u6301\u534f\u7a0b\u65b9\u5f0f\u7684 MySQL \u64cd\u4f5c\u3002\u901a\u8fc7\u534f\u7a0b\uff0c\u4f60\u53ef\u4ee5\u6267\u884c MySQL \u67e5\u8be2\u800c\u4e0d\u4f1a\u963b\u585e\u4e3b\u7ebf\u7a0b\uff0c\u8fd9\u4f7f\u5f97\u5e76\u53d1\u64cd\u4f5c\u5f97\u4ee5\u5728\u540c\u4e00\u7ebf\u7a0b\u4e2d\u9ad8\u6548\u6267\u884c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1.1 <strong>MySQL \u57fa\u7840\u4f7f\u7528<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Swoole \u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528 <code>Swoole\\Coroutine\\Mysql<\/code> \u6765\u6267\u884c\u5f02\u6b65\u6570\u636e\u5e93\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    \/\/ \u521b\u5efa\u4e00\u4e2a MySQL \u8fde\u63a5\n    $mysql = new Swoole\\Coroutine\\Mysql();\n\n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $result = $mysql-&gt;connect(&#91;\n        'host' =&gt; '127.0.0.1',\n        'port' =&gt; 3306,\n        'user' =&gt; 'root',\n        'password' =&gt; '',\n        'database' =&gt; 'test',\n    ]);\n\n    \/\/ \u6267\u884c\u67e5\u8be2\n    $queryResult = $mysql-&gt;query(\"SELECT * FROM users\");\n\n    \/\/ \u6253\u5370\u67e5\u8be2\u7ed3\u679c\n    var_dump($queryResult);\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u534f\u7a0b\u8fde\u63a5<\/strong>\uff1a\u5728 Swoole \u4e2d\uff0c\u901a\u8fc7 <code>Swoole\\Coroutine\\Mysql<\/code> \u53ef\u4ee5\u4ee5\u5f02\u6b65\u975e\u963b\u585e\u7684\u65b9\u5f0f\u8fde\u63a5\u6570\u636e\u5e93\u548c\u6267\u884c SQL \u67e5\u8be2\u3002<\/li>\n\n\n\n<li><strong>\u81ea\u52a8\u91ca\u653e\u8fde\u63a5<\/strong>\uff1aSwoole \u4f1a\u81ea\u52a8\u7ba1\u7406\u6570\u636e\u5e93\u8fde\u63a5\u6c60\u548c\u8fde\u63a5\u7684\u91ca\u653e\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">1.2 <strong>MySQL \u4e8b\u52a1\u652f\u6301<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u534f\u7a0b\uff0cSwoole \u652f\u6301\u4e8b\u52a1\u64cd\u4f5c\uff0c\u4f60\u53ef\u4ee5\u5728\u4e8b\u52a1\u4e2d\u6267\u884c\u591a\u6761 SQL \u8bed\u53e5\uff0c\u5e76\u5728\u6700\u540e\u8fdb\u884c\u63d0\u4ea4\u6216\u56de\u6eda\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    $mysql = new Swoole\\Coroutine\\Mysql();\n\n    $mysql-&gt;connect(&#91;\n        'host' =&gt; '127.0.0.1',\n        'port' =&gt; 3306,\n        'user' =&gt; 'root',\n        'password' =&gt; '',\n        'database' =&gt; 'test',\n    ]);\n\n    \/\/ \u5f00\u59cb\u4e8b\u52a1\n    $mysql-&gt;query(\"START TRANSACTION\");\n\n    \/\/ \u6267\u884c\u63d2\u5165\u64cd\u4f5c\n    $mysql-&gt;query(\"INSERT INTO users (name, age) VALUES ('John', 30)\");\n\n    \/\/ \u63d0\u4ea4\u4e8b\u52a1\n    $mysql-&gt;query(\"COMMIT\");\n});<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">1.3 <strong>MySQL \u9ad8\u7ea7\u7528\u6cd5\uff1a\u8fde\u63a5\u6c60<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u4e5f\u63d0\u4f9b\u4e86 <strong>MySQL \u8fde\u63a5\u6c60<\/strong>\uff0c\u5141\u8bb8\u4f60\u590d\u7528\u8fde\u63a5\u800c\u4e0d\u662f\u6bcf\u6b21\u8bf7\u6c42\u90fd\u5efa\u7acb\u65b0\u7684\u8fde\u63a5\uff0c\u4ece\u800c\u63d0\u9ad8\u6027\u80fd\u3002\u8fde\u63a5\u6c60\u7684\u914d\u7f6e\u901a\u5e38\u7531 <code>Swoole\\Coroutine\\MySQL\\Pool<\/code> \u7c7b\u6765\u7ba1\u7406\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>use Swoole\\Coroutine\\MySQL\\Pool;\n\nSwoole\\Coroutine\\run(function () {\n    $pool = new Pool(10, &#91;\n        'host' =&gt; '127.0.0.1',\n        'port' =&gt; 3306,\n        'user' =&gt; 'root',\n        'password' =&gt; '',\n        'database' =&gt; 'test',\n    ]);\n\n    $mysql = $pool-&gt;get();  \/\/ \u4ece\u8fde\u63a5\u6c60\u83b7\u53d6\u4e00\u4e2a\u8fde\u63a5\n    $result = $mysql-&gt;query(\"SELECT * FROM users\");\n    var_dump($result);\n\n    $pool-&gt;put($mysql);  \/\/ \u5c06\u8fde\u63a5\u653e\u56de\u8fde\u63a5\u6c60\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u8fde\u63a5\u6c60<\/strong>\uff1a<code>Swoole\\Coroutine\\MySQL\\Pool<\/code> \u901a\u8fc7\u7ef4\u62a4\u4e00\u4e2a\u8fde\u63a5\u6c60\u6765\u7ba1\u7406 MySQL \u8fde\u63a5\uff0c\u51cf\u5c11\u4e86\u8fde\u63a5\u7684\u521b\u5efa\u548c\u9500\u6bc1\u6210\u672c\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. <strong>Swoole \u4e0e Redis \u96c6\u6210<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u540c\u6837\u652f\u6301 Redis \u7684\u5f02\u6b65\u534f\u7a0b\u64cd\u4f5c\u3002\u4f7f\u7528 <code>Swoole\\Coroutine\\Redis<\/code>\uff0c\u4f60\u53ef\u4ee5\u4ee5\u975e\u963b\u585e\u65b9\u5f0f\u4e0e Redis \u8fdb\u884c\u4ea4\u4e92\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2.1 <strong>Redis \u57fa\u7840\u4f7f\u7528<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    $redis = new Swoole\\Coroutine\\Redis();\n\n    \/\/ \u8fde\u63a5\u5230 Redis \u670d\u52a1\n    $redis-&gt;connect('127.0.0.1', 6379);\n\n    \/\/ \u8bbe\u7f6e\u503c\n    $redis-&gt;set('foo', 'bar');\n\n    \/\/ \u83b7\u53d6\u503c\n    $value = $redis-&gt;get('foo');\n\n    echo $value;  \/\/ \u8f93\u51fa \"bar\"\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u534f\u7a0b Redis<\/strong>\uff1a<code>Swoole\\Coroutine\\Redis<\/code> \u63d0\u4f9b\u4e86\u5f02\u6b65\u7684 Redis \u64cd\u4f5c\uff0c\u907f\u514d\u4e86\u963b\u585e\u4e3b\u8fdb\u7a0b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.2 <strong>Redis \u7ba1\u9053\u64cd\u4f5c<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7 Redis \u7ba1\u9053\uff08Pipeline\uff09\u4f60\u53ef\u4ee5\u5c06\u591a\u4e2a Redis \u547d\u4ee4\u6253\u5305\u5728\u4e00\u8d77\u8fdb\u884c\u6279\u91cf\u6267\u884c\uff0c\u63d0\u5347\u6548\u7387\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    $redis = new Swoole\\Coroutine\\Redis();\n\n    \/\/ \u8fde\u63a5 Redis\n    $redis-&gt;connect('127.0.0.1', 6379);\n\n    \/\/ \u5f00\u59cb\u7ba1\u9053\u64cd\u4f5c\n    $redis-&gt;multi();  \/\/ \u5f00\u59cb\u7ba1\u9053\n\n    $redis-&gt;set('key1', 'value1');\n    $redis-&gt;set('key2', 'value2');\n\n    $redis-&gt;exec();  \/\/ \u6267\u884c\u7ba1\u9053\u64cd\u4f5c\n\n    \/\/ \u83b7\u53d6\u5e76\u663e\u793a\u7ed3\u679c\n    echo $redis-&gt;get('key1');  \/\/ \u8f93\u51fa \"value1\"\n    echo $redis-&gt;get('key2');  \/\/ \u8f93\u51fa \"value2\"\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7ba1\u9053\uff08Pipeline\uff09<\/strong>\uff1a\u901a\u8fc7 Redis \u7ba1\u9053\uff0c\u591a\u4e2a\u547d\u4ee4\u53ef\u4ee5\u4e00\u6b21\u6027\u53d1\u9001\uff0c\u51cf\u5c11\u4e86\u7f51\u7edc\u5ef6\u8fdf\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">2.3 <strong>Redis \u8ba2\u9605\/\u53d1\u5e03 (Pub\/Sub)<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u63d0\u4f9b\u4e86\u5bf9 Redis Pub\/Sub \u7684\u652f\u6301\uff0c\u53ef\u4ee5\u7528\u6765\u6784\u5efa\u5b9e\u65f6\u6d88\u606f\u7cfb\u7edf\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    $redis = new Swoole\\Coroutine\\Redis();\n\n    \/\/ \u8fde\u63a5 Redis\n    $redis-&gt;connect('127.0.0.1', 6379);\n\n    \/\/ \u8ba2\u9605\u9891\u9053\n    $redis-&gt;subscribe(&#91;'news_channel'], function ($redis, $channel, $message) {\n        echo \"Received message: {$message} on channel: {$channel}\\n\";\n    });\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Pub\/Sub \u6a21\u5f0f<\/strong>\uff1a\u4f7f\u7528 <code>subscribe<\/code> \u65b9\u6cd5\u8ba2\u9605\u9891\u9053\uff0c\u5b9e\u65f6\u63a5\u6536\u6d88\u606f\u3002\u652f\u6301\u5f02\u6b65\u7684\u6d88\u606f\u5904\u7406\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. <strong>Swoole \u4e0e PostgreSQL \u96c6\u6210<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u540c\u6837\u53ef\u4ee5\u4e0e PostgreSQL \u6570\u636e\u5e93\u7ed3\u5408\u4f7f\u7528\uff0c\u867d\u7136 Swoole \u539f\u751f\u6ca1\u6709 <code>Swoole\\Coroutine\\PostgreSQL<\/code> \u7c7b\uff0c\u4f46\u4f60\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u534f\u7a0b\u652f\u6301\u5e93\uff08\u5982 <code>swooletw\/postgres<\/code>\uff09\u6765\u8fdb\u884c\u5f02\u6b65\u64cd\u4f5c\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3.1 <strong>PostgreSQL \u57fa\u7840\u4f7f\u7528<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>use SwooleTW\\Postgres\\DB;\n\nSwoole\\Coroutine\\run(function () {\n    $db = DB::connection();  \/\/ \u83b7\u53d6 PostgreSQL \u8fde\u63a5\n\n    $result = $db-&gt;select('SELECT * FROM users');\n    var_dump($result);\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u534f\u7a0b\u652f\u6301<\/strong>\uff1a\u901a\u8fc7\u4f7f\u7528\u534f\u7a0b\uff0cPostgreSQL \u67e5\u8be2\u5c06\u4e0d\u4f1a\u963b\u585e\u5176\u4ed6\u534f\u7a0b\uff0c\u6781\u5927\u63d0\u9ad8\u5e76\u53d1\u6027\u80fd\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. <strong>\u4e8b\u52a1\u7ba1\u7406<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u652f\u6301\u5728\u6570\u636e\u5e93\u64cd\u4f5c\u4e2d\u4f7f\u7528\u4e8b\u52a1\u6765\u4fdd\u8bc1\u6570\u636e\u7684\u4e00\u81f4\u6027\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Swoole\\Coroutine\\run(function () {\n    $mysql = new Swoole\\Coroutine\\Mysql();\n\n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $mysql-&gt;connect(&#91;\n        'host' =&gt; '127.0.0.1',\n        'port' =&gt; 3306,\n        'user' =&gt; 'root',\n        'password' =&gt; '',\n        'database' =&gt; 'test',\n    ]);\n\n    \/\/ \u5f00\u542f\u4e8b\u52a1\n    $mysql-&gt;query(\"START TRANSACTION\");\n\n    \/\/ \u6267\u884c\u67e5\u8be2\n    $mysql-&gt;query(\"UPDATE users SET age = 31 WHERE name = 'John'\");\n\n    \/\/ \u63d0\u4ea4\u4e8b\u52a1\n    $mysql-&gt;query(\"COMMIT\");\n});<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4e8b\u52a1\u652f\u6301<\/strong>\uff1a\u901a\u8fc7 <code>START TRANSACTION<\/code> \u548c <code>COMMIT<\/code> \u53ef\u4ee5\u5728\u534f\u7a0b\u4e2d\u4f7f\u7528\u4e8b\u52a1\uff0c\u786e\u4fdd\u4e00\u7cfb\u5217\u64cd\u4f5c\u7684\u539f\u5b50\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. <strong>\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Swoole \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u534f\u7a0b\u652f\u6301\uff0c\u53ef\u4ee5\u4e0e\u591a\u79cd\u6570\u636e\u5e93\uff08\u5982 MySQL\u3001Redis\u3001PostgreSQL\uff09\u9ad8\u6548\u96c6\u6210\u3002\u901a\u8fc7\u534f\u7a0b\u548c\u8fde\u63a5\u6c60\u7b49\u7279\u6027\uff0cSwoole \u80fd\u591f\u663e\u8457\u63d0\u9ad8\u6570\u636e\u5e93\u64cd\u4f5c\u7684\u6027\u80fd\u548c\u5e76\u53d1\u80fd\u529b\uff0c\u4f7f\u5f97 PHP \u5728\u9ad8\u5e76\u53d1\u573a\u666f\u4e0b\u4e5f\u80fd\u8868\u73b0\u5f97\u66f4\u52a0\u4f18\u79c0\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>MySQL \u96c6\u6210<\/strong>\uff1a\u901a\u8fc7 <code>Swoole\\Coroutine\\Mysql<\/code> \u63d0\u4f9b\u5f02\u6b65\u67e5\u8be2\u548c\u4e8b\u52a1\u652f\u6301\uff0c\u8fde\u63a5\u6c60\u63d0\u9ad8\u6027\u80fd\u3002<\/li>\n\n\n\n<li><strong>Redis \u96c6\u6210<\/strong>\uff1a\u4f7f\u7528 <code>Swoole\\Coroutine\\Redis<\/code> \u63d0\u4f9b\u5f02\u6b65\u8bbf\u95ee Redis\uff0c\u5305\u62ec\u7ba1\u9053\u64cd\u4f5c\u3001Pub\/Sub\u3002<\/li>\n\n\n\n<li><strong>PostgreSQL \u96c6\u6210<\/strong>\uff1a\u901a\u8fc7\u7b2c\u4e09\u65b9\u5e93\u5b9e\u73b0\u5f02\u6b65\u67e5\u8be2\u548c\u534f\u7a0b\u652f\u6301\u3002<\/li>\n\n\n\n<li><strong>\u4e8b\u52a1\u652f\u6301<\/strong>\uff1a\u5728 Swoole \u4e2d\uff0c\u6570\u636e\u5e93\u4e8b\u52a1\u64cd\u4f5c\u80fd\u591f\u548c\u534f\u7a0b\u65e0\u7f1d\u7ed3\u5408\uff0c\u786e\u4fdd\u6570\u636e\u4e00\u81f4\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u5408\u7406\u914d\u7f6e Swoole \u4e0e\u6570\u636e\u5e93\u7684\u96c6\u6210\uff0c\u4f60\u53ef\u4ee5\u5927\u5e45\u63d0\u9ad8 PHP \u5e94\u7528\u7684\u6027\u80fd\u548c\u53ef\u6269\u5c55\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swoole \u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u534f\u7a0b\u652f\u6301\u548c\u9ad8\u6548\u7684\u5f02\u6b65 I\/O \u7279\u6027\uff0c\u4f7f\u5176\u80fd\u591f\u4e0e\u591a\u79cd\u6570\u636e\u5e93\u8fdb\u884c\u9ad8\u6548\u96c6\u6210\u3002\u5728\u4f20\u7edf\u7684 PH [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[64],"tags":[],"class_list":["post-1072","post","type-post","status-publish","format-standard","hentry","category-swoole"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1072","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/comments?post=1072"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1072\/revisions"}],"predecessor-version":[{"id":1073,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/1072\/revisions\/1073"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=1072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=1072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=1072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}