{"id":10008285,"date":"2023-09-19T19:04:34","date_gmt":"2023-09-19T11:04:34","guid":{"rendered":"https:\/\/blog.itmax.cn\/?p=10008285"},"modified":"2023-09-19T19:04:34","modified_gmt":"2023-09-19T11:04:34","slug":"%e4%bd%bf%e7%94%a8chatgpt%e7%bc%96%e5%86%99%e7%9a%84php%e6%95%b0%e6%8d%ae%e5%ba%93pdo%e6%93%8d%e4%bd%9c%e7%b1%bb%ef%bc%88%e5%a2%9e%e5%88%a0%e6%94%b9%e6%9f%a5%ef%bc%89","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10008285","title":{"rendered":"\u4f7f\u7528Chatgpt\u7f16\u5199\u7684PHP\u6570\u636e\u5e93pdo\u64cd\u4f5c\u7c7b\uff08\u589e\u5220\u6539\u67e5\uff09"},"content":{"rendered":"<h2>\u6458\u8981<\/h2>\n<p>\u5c06PDO\u5c01\u88c5\u6210PHP\u7c7b\u8fdb\u884c\u8c03\u7528\u6709\u5f88\u591a\u597d\u5904\uff0c\u5305\u62ec\uff1a<\/p>\n<p><strong>1\u3001\u5c01\u88c5\u6027\u548c\u62bd\u8c61\u6027\uff1a<\/strong> \u901a\u8fc7\u5c06PDO\u5c01\u88c5\u5230\u4e00\u4e2a\u7c7b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u5c06\u6570\u636e\u5e93\u64cd\u4f5c\u903b\u8f91\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7684\u5176\u4ed6\u90e8\u5206\u5206\u79bb\u5f00\u6765\uff0c\u63d0\u9ad8\u4e86\u4ee3\u7801\u7684\u7ec4\u7ec7\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u8fd9\u6837\uff0c\u60a8\u53ea\u9700\u5728\u4e00\u4e2a\u5730\u65b9\u7ef4\u62a4\u6570\u636e\u5e93\u8fde\u63a5\u548c\u67e5\u8be2\u903b\u8f91\uff0c\u800c\u4e0d\u5fc5\u5728\u6574\u4e2a\u5e94\u7528\u7a0b\u5e8f\u4e2d\u6563\u5e03\u6570\u636e\u5e93\u4ee3\u7801\u3002<\/p>\n<p><strong>2\u3001\u91cd\u7528\u6027\uff1a<\/strong> \u5c06\u6570\u636e\u5e93\u64cd\u4f5c\u5c01\u88c5\u6210\u7c7b\u4f7f\u5f97\u8fd9\u4e9b\u64cd\u4f5c\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u7684\u4e0d\u540c\u90e8\u5206\u91cd\u590d\u4f7f\u7528\uff0c\u800c\u65e0\u9700\u91cd\u590d\u7f16\u5199\u76f8\u540c\u7684\u4ee3\u7801\u3002\u8fd9\u6709\u52a9\u4e8e\u51cf\u5c11\u4ee3\u7801\u5197\u4f59\uff0c\u63d0\u9ad8\u6548\u7387\u3002<\/p>\n<p><strong>3\u3001\u5b89\u5168\u6027\uff1a<\/strong> \u901a\u8fc7\u7c7b\u7684\u65b9\u6cd5\u6765\u6267\u884c\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5b9e\u65bd\u9884\u5904\u7406\u8bed\u53e5\uff0c\u4ece\u800c\u51cf\u5c11\u4e86SQL\u6ce8\u5165\u653b\u51fb\u7684\u98ce\u9669\u3002\u7c7b\u8fd8\u53ef\u4ee5\u63d0\u4f9b\u9519\u8bef\u5904\u7406\u673a\u5236\uff0c\u4f7f\u60a8\u80fd\u591f\u66f4\u5bb9\u6613\u5730\u5904\u7406\u6570\u636e\u5e93\u9519\u8bef\u3002<\/p>\n<p><strong>4\u3001\u53ef\u6269\u5c55\u6027\uff1a<\/strong> \u4f7f\u7528\u7c7b\u5c01\u88c5\u6570\u636e\u5e93\u64cd\u4f5c\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u6269\u5c55\u548c\u7ef4\u62a4\u5e94\u7528\u7a0b\u5e8f\u3002\u5982\u679c\u9700\u8981\u6dfb\u52a0\u65b0\u7684\u6570\u636e\u5e93\u64cd\u4f5c\u6216\u66f4\u6539\u73b0\u6709\u7684\u64cd\u4f5c\uff0c\u53ea\u9700\u4fee\u6539\u7c7b\u4e2d\u7684\u76f8\u5e94\u65b9\u6cd5\u800c\u4e0d\u5fc5\u66f4\u6539\u5e94\u7528\u7a0b\u5e8f\u7684\u5176\u4ed6\u90e8\u5206\u3002<\/p>\n<p><strong>5\u3001\u6e05\u6670\u7684\u63a5\u53e3\uff1a<\/strong> \u7c7b\u63d0\u4f9b\u4e86\u4e00\u4e2a\u6e05\u6670\u7684\u63a5\u53e3\uff0c\u4f7f\u5176\u4ed6\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u66f4\u5bb9\u6613\u5730\u7406\u89e3\u548c\u4f7f\u7528\u6570\u636e\u5e93\u64cd\u4f5c\u3002\u8fd9\u6709\u52a9\u4e8e\u56e2\u961f\u534f\u4f5c\u548c\u4ee3\u7801\u7ef4\u62a4\u3002<\/p>\n<p>\u5c06PDO\u5c01\u88c5\u6210PHP\u7c7b\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u3001\u53ef\u91cd\u7528\u6027\u548c\u5b89\u5168\u6027\uff0c\u540c\u65f6\u964d\u4f4e\u4e86\u4ee3\u7801\u7684\u8026\u5408\u5ea6\uff0c\u4f7f\u6570\u636e\u5e93\u64cd\u4f5c\u66f4\u5bb9\u6613\u7ba1\u7406\u548c\u6269\u5c55\u3002\u8fd9\u662f\u4e00\u4e2a\u826f\u597d\u7684\u8f6f\u4ef6\u5de5\u7a0b\u5b9e\u8df5\uff0c\u7279\u522b\u9002\u7528\u4e8e\u4e2d\u5927\u578b\u548c\u590d\u6742\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h2>\u7c7b\u6587\u4ef6<\/h2>\n<p><strong>Database.php<\/strong><\/p>\n<p>\u4ee5\u4e0b\u662f\u4f7f\u7528Chatgpt\u751f\u6210\u7684\u64cd\u4f5c\u7c7b\uff0c\u4f46\u662f\u6211\u505a\u4e8630%\u7684\u4fee\u6539\u548c\u4f18\u5316\u3002<\/p>\n<pre><code>&lt;?php\n\n    \/**\n     * Title\uff1aPDO\u6570\u636e\u5e93\u64cd\u4f5c\u7c7b\n     * Author\uff1aTANKING\n     * Blog\uff1ahttps:\/\/segmentfault.com\/u\/tanking\n     * Date\uff1a2023-09-18\n     *\/\n\n    class Database\n    {\n        private $host;\n        private $username;\n        private $password;\n        private $database;\n        private $pdo;\n        private $error = null;\n    \n        public function __construct($host, $username, $password, $database)\n        {\n            $this-&gt;host = $host;\n            $this-&gt;username = $username;\n            $this-&gt;password = $password;\n            $this-&gt;database = $database;\n    \n            $this-&gt;connect();\n        }\n        \n        \/\/ \u83b7\u53d6\u9519\u8bef\u4fe1\u606f\n        public function getError()\n        {\n            return $this-&gt;error;\n        }\n        \n        \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n        private function connect()\n        {\n            $dsn = &quot;mysql:host={$this-&gt;host};dbname={$this-&gt;database}&quot;;\n            try {\n                $this-&gt;pdo = new PDO($dsn, $this-&gt;username, $this-&gt;password);\n                $this-&gt;pdo-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n            } catch (PDOException $e) {\n                die(&quot;Connection failed: &quot; . $e-&gt;getMessage());\n            }\n        }\n        \n        \/\/ \u63d2\u5165\u6570\u636e\n        public function insert($table, $data)\n        {\n            try {\n                \n                $columns = implode(&quot;, &quot;, array_keys($data));\n                $values = &quot;:&quot; . implode(&quot;, :&quot;, array_keys($data));\n                $sql = &quot;INSERT INTO $table ($columns) VALUES ($values)&quot;;\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $result = $stmt-&gt;execute($data);\n                if (!$result) {\n                    $this-&gt;error = $stmt-&gt;errorInfo();\n                }\n                return $result;\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $e-&gt;getMessage();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u66f4\u65b0\u6570\u636e\n        public function update($table, $data, $where)\n        {\n            try {\n                \n                $set = &quot;&quot;;\n                foreach ($data as $key =&gt; $value) {\n                    $set .= &quot;$key = :$key, &quot;;\n                }\n                $set = rtrim($set, ', ');\n                $sql = &quot;UPDATE $table SET $set WHERE $where&quot;;\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $result = $stmt-&gt;execute($data);\n                if (!$result) {\n                    $this-&gt;error = $stmt-&gt;errorInfo();\n                }\n                return $result;\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $e-&gt;getMessage();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u5220\u9664\u6570\u636e\n        public function delete($table, $where)\n        {\n            try {\n                \n                $sql = &quot;DELETE FROM $table WHERE $where&quot;;\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $result = $stmt-&gt;execute();\n                \n                if($stmt-&gt;rowCount() === 0) {\n                    \n                    \/\/ \u6ca1\u6709\u53d7\u5f71\u54cd\u7684\u8bb0\u5f55\n                    $this-&gt;error = '\u6ca1\u6709\u53d7\u5f71\u54cd\u7684\u8bb0\u5f55';\n                    return FALSE;\n                }else {\n                    \n                    return $result;\n                }\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $e-&gt;getMessage();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u67e5\u8be2\u4e00\u6761\u6570\u636e\n        public function queryOne($table, $conditions = [])\n        {\n            $whereClause = $this-&gt;buildWhereClause($conditions);\n            $sql = &quot;SELECT * FROM $table $whereClause LIMIT 1&quot;;\n    \n            try {\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $stmt-&gt;execute($conditions);\n    \n                return $stmt-&gt;fetch(PDO::FETCH_ASSOC);\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $e-&gt;getMessage();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u67e5\u8be2\u6240\u6709\u6570\u636e\n        public function queryAll($table, $conditions = [])\n        {\n            $whereClause = $this-&gt;buildWhereClause($conditions);\n            $sql = &quot;SELECT * FROM $table $whereClause&quot;;\n    \n            try {\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $stmt-&gt;execute($conditions);\n    \n                return $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $e-&gt;getMessage();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u6267\u884c\u539f\u751fSQL\u8bed\u53e5\n        public function executeSQL($sql, $params = [])\n        {\n            try {\n                $stmt = $this-&gt;pdo-&gt;prepare($sql);\n                $result = $stmt-&gt;execute($params);\n    \n                if (!$result) {\n                    \n                    \/\/ \u6267\u884c\u5931\u8d25\n                    $this-&gt;error = $stmt-&gt;errorInfo();\n                    return FALSE;\n                }\n    \n                return $stmt;\n            } catch (PDOException $e) {\n                \n                \/\/ \u5904\u7406\u6570\u636e\u5e93\u5f02\u5e38\n                $this-&gt;error = $stmt-&gt;errorInfo();\n                return FALSE;\n            }\n        }\n        \n        \/\/ \u6570\u636e\u7ed1\u5b9a\n        private function buildWhereClause($conditions)\n        {\n            if (empty($conditions)) {\n                return '';\n            }\n    \n            $where = 'WHERE';\n            foreach ($conditions as $key =&gt; $value) {\n                $where .= &quot; $key = :$key AND&quot;;\n            }\n            $where = rtrim($where, ' AND');\n    \n            return $where;\n        }\n    }<\/code><\/pre>\n<h2>\u5b9e\u4f8b<\/h2>\n<p><strong>\u914d\u7f6e\u6587\u4ef6 Db.php<\/strong><\/p>\n<pre><code>&lt;?php\n\n    \/**\n     * Title\uff1a\u6570\u636e\u5e93\u914d\u7f6e\n     * Author\uff1aTANKING\n     * Blog\uff1ahttps:\/\/segmentfault.com\/u\/tanking\n     * Date\uff1a2023-09-18\n     *\/\n    $DbConfig = array(\n        'db_host' =&gt; 'xxx', \/\/ \u6570\u636e\u5e93\u670d\u52a1\u5668\n        'db_name' =&gt; 'xxx', \/\/ \u6570\u636e\u5e93\u540d\n        'db_user' =&gt; 'xxx', \/\/ \u6570\u636e\u5e93\u8d26\u53f7\n        'db_pwd' =&gt; 'xxx', \/\/ \u6570\u636e\u5e93\u5bc6\u7801\n    );\n    \n    include 'Database.php';\n?&gt;<\/code><\/pre>\n<p>\u4ee5\u4e0b\u5b9e\u4f8b\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3a<code>artcles<\/code>\u7684\u6570\u636e\u5e93\u8868\u8fdb\u884c\u64cd\u4f5c\u6f14\u793a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"656\" height=\"314\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/bVc9K07\" alt=\"image.png\" title=\"image.png\"><\/p>\n<p><strong>\u63d2\u5165\u6570\u636e insert.php<\/strong><\/p>\n<pre><code>&lt;?php\n    \n    \/\/ \u7f16\u7801\n    header(&quot;Content-type:application\/json&quot;);\n    \n    \/\/ \u6570\u636e\u5e93\u914d\u7f6e\n    include 'Db.php';\n    \n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $db = new Database($DbConfig['db_host'], $DbConfig['db_user'], $DbConfig['db_pwd'], $DbConfig['db_name']);\n\n    \/\/ \u63d2\u5165\u6570\u636e\n    $data = [\n        'aid' =&gt; rand(100000,999999), \n        'title' =&gt; 'sdfgsadg',\n        'tag' =&gt; 'ceshi',\n        'content' =&gt; '\u8fd9\u662f\u5185\u5bb9',\n        'author' =&gt; 'TANKING'\n    ];\n    $insertArtcle = $db-&gt;insert('artcles', $data);\n    \n    if($insertArtcle){\n        echo '\u63d2\u5165\u6210\u529f';\n    }else{\n        echo '\u5931\u8d25\uff01' . $db-&gt;getError();\n    }\n\n?&gt;<\/code><\/pre>\n<p><strong>\u66f4\u65b0\u6570\u636e update.php<\/strong><\/p>\n<pre><code>&lt;?php\n    \n    \/\/ \u7f16\u7801\n    header(&quot;Content-type:application\/json&quot;);\n    \n    \/\/ \u6570\u636e\u5e93\u914d\u7f6e\n    include 'Db.php';\n    \n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $db = new Database($DbConfig['db_host'], $DbConfig['db_user'], $DbConfig['db_pwd'], $DbConfig['db_name']);\n\n    \/\/ \u66f4\u65b0\n    $updateData = ['tag' =&gt; '\u6d4b\u8bd5'];\n    $where = 'id = 19';\n    $updateArtcle = $db-&gt;update('artcles', $updateData, $where);\n    if($updateArtcle){\n        echo '\u66f4\u65b0\u6210\u529f\uff01';\n    }else{\n        echo '\u66f4\u65b0\u5931\u8d25\uff01' . $db-&gt;getError();\n    }\n\n?&gt;<\/code><\/pre>\n<p><strong>\u5220\u9664\u6570\u636e delete.php<\/strong><\/p>\n<pre><code>&lt;?php\n    \n    \/\/ \u7f16\u7801\n    header(&quot;Content-type:application\/json&quot;);\n    \n    \/\/ \u6570\u636e\u5e93\u914d\u7f6e\n    include 'Db.php';\n    \n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $db = new Database($DbConfig['db_host'], $DbConfig['db_user'], $DbConfig['db_pwd'], $DbConfig['db_name']);\n\n    \/\/ \u5220\u9664\n    $where = 'id = 11';\n    $deleteArtcle = $db-&gt;delete('artcles', $where);\n    if($deleteArtcle){\n        echo '\u5220\u9664\u6210\u529f\uff01';\n    }else{\n        echo '\u5220\u9664\u5931\u8d25\uff01' . $db-&gt;getError();\n    }\n\n?&gt;<\/code><\/pre>\n<p><strong>\u67e5\u8be2\u4e00\u6761\u6570\u636e queryOne.php<\/strong><\/p>\n<pre><code>&lt;?php\n    \n    \/\/ \u7f16\u7801\n    header(&quot;Content-type:application\/json&quot;);\n    \n    \/\/ \u6570\u636e\u5e93\u914d\u7f6e\n    include 'Db.php';\n    \n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $db = new Database($DbConfig['db_host'], $DbConfig['db_user'], $DbConfig['db_pwd'], $DbConfig['db_name']);\n\n    \/\/ \u67e5\u8be2\u4e00\u6761\u6570\u636e\n    $conditions = ['id' =&gt; 18];\n    $getArtcle = $db-&gt;queryOne('artcles', $conditions);\n    if($getArtcle){\n        echo json_encode($getArtcle);\n    }else{\n        echo '\u67e5\u8be2\u5931\u8d25\uff01' . $db-&gt;getError();\n    }\n\n?&gt;<\/code><\/pre>\n<p><strong>\u67e5\u8be2\u6240\u6709\u6570\u636e queryAll.php<\/strong><\/p>\n<pre><code>&lt;?php\n    \n    \/\/ \u7f16\u7801\n    header(&quot;Content-type:application\/json&quot;);\n    \n    \/\/ \u6570\u636e\u5e93\u914d\u7f6e\n    include 'Db.php';\n    \n    \/\/ \u8fde\u63a5\u6570\u636e\u5e93\n    $db = new Database($DbConfig['db_host'], $DbConfig['db_user'], $DbConfig['db_pwd'], $DbConfig['db_name']);\n\n    \/\/ \u67e5\u8be2\u6240\u6709\u6570\u636e\n    $conditions = [];\n    $getArtcles = $db-&gt;queryAll('artcles', $conditions);\n    if($getArtcles){\n        echo json_encode($getArtcles);\n    }else{\n        echo '\u67e5\u8be2\u5931\u8d25\uff01' . $db-&gt;getError();\n    }\n\n?&gt;<\/code><\/pre>\n<p><strong>\u6267\u884c\u539f\u751fSQL\u8bed\u53e5<\/strong><\/p>\n<pre><code>\/\/ \u63d2\u5165\n$sql = &quot;INSERT INTO artcles (aid, title, tag, content, author) VALUES (:aid, :title, :tag, :content, :author)&quot;;\n$params = [\n    ':aid' =&gt; rand(100000,999999), \n    ':title' =&gt; '\u8fd9\u662f\u6807\u9898' . uniqid(),\n    ':tag' =&gt; 'tag' . rand(0,9),\n    ':content' =&gt; '\u8fd9\u662f\u5185\u5bb9' . uniqid(),\n    ':author' =&gt; 'TANKING'\n];\n\n\/\/ \u66f4\u65b0\n$sql = &quot;UPDATE artcles SET title = :title WHERE id = :id&quot;;\n$params = [\n    ':id' =&gt; 22,\n    ':title' =&gt; '\u8fd9\u662f\u6807\u9898_\u5df2\u66f4\u65b0',\n];\n\n\/\/ \u5220\u9664\n$sql = &quot;DELETE FROM artcles WHERE id = :id&quot;;\n$params = [\n    ':id' =&gt; 20\n];\n\n\/\/ \u67e5\u8be2\n$sql = &quot;SELECT * FROM artcles&quot;;\ntry {\n    $stmt = $db-&gt;executeSQL($sql);\n\n    if ($stmt) {\n        $result = $stmt-&gt;fetchAll(PDO::FETCH_ASSOC);\n\n        if (empty($result)) {\n\n            \/\/ \u6ca1\u6709\u5339\u914d\u7684\u7ed3\u679c\n            echo &quot;\u6ca1\u6709\u5339\u914d\u7684\u7ed3\u679c&quot;;\n        } else {\n\n            echo json_encode($result);\n        }\n    } else {\n\n        echo &quot;\u67e5\u8be2\u5931\u8d25\uff0c\u9519\u8bef\u4fe1\u606f\uff1a&quot; . json_encode($db-&gt;getError());\n    }\n} catch (DatabaseException $e) {\n\n    \/\/ \u67e5\u8be2\u5931\u8d25\n    echo $e-&gt;getMessage();\n}<\/code><\/pre>\n<h2>\u4f5c\u8005<\/h2>\n<p>TANKING<\/p>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000044232389\">https:\/\/segmentfault.com\/a\/1190000044232389<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981 \u5c06PDO\u5c01\u88c5\u6210PHP\u7c7b\u8fdb\u884c\u8c03\u7528\u6709\u5f88\u591a\u597d\u5904\uff0c\u5305\u62ec\uff1a 1\u3001\u5c01\u88c5\u6027\u548c\u62bd\u8c61\u6027\uff1a \u901a\u8fc7\u5c06PDO\u5c01\u88c5\u5230\u4e00\u4e2a\u7c7b\u4e2d\uff0c\u60a8\u53ef [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-10008285","post","type-post","status-publish","format-standard","hentry","category-share"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10008285"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10008285\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10008285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10008285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10008285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}