{"id":3063,"date":"2025-03-21T00:05:30","date_gmt":"2025-03-20T16:05:30","guid":{"rendered":"https:\/\/www.laixuexila.com\/?p=3063"},"modified":"2025-03-21T00:05:30","modified_gmt":"2025-03-20T16:05:30","slug":"php-%e9%94%99%e8%af%af%e5%a4%84%e7%90%86%e5%ae%8c%e6%95%b4%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.laixuexila.com\/index.php\/2025\/03\/21\/php-%e9%94%99%e8%af%af%e5%a4%84%e7%90%86%e5%ae%8c%e6%95%b4%e6%8c%87%e5%8d%97\/","title":{"rendered":"PHP \u9519\u8bef\u5904\u7406\u5b8c\u6574\u6307\u5357"},"content":{"rendered":"\n<p>PHP \u63d0\u4f9b\u4e86\u591a\u79cd\u9519\u8bef\u5904\u7406\u673a\u5236\uff0c\u786e\u4fdd\u5728\u5e94\u7528\u7a0b\u5e8f\u53d1\u751f\u9519\u8bef\u65f6\uff0c\u80fd\u591f\u6b63\u786e\u5730 <strong>\u6355\u83b7\u3001\u8bb0\u5f55\u3001\u663e\u793a<\/strong> \u5e76\u91c7\u53d6\u9002\u5f53\u7684\u5904\u7406\u63aa\u65bd\u3002\u672c\u6587\u5c06\u4ecb\u7ecd PHP \u9519\u8bef\u5904\u7406\u7684\u5b8c\u6574\u65b9\u6848\uff0c\u5305\u62ec <strong>\u9519\u8bef\u7ea7\u522b\u3001\u9519\u8bef\u65e5\u5fd7\u3001\u5f02\u5e38\u5904\u7406\u3001\u9519\u8bef\u5904\u7406\u51fd\u6570<\/strong> \u7b49\u5185\u5bb9\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. PHP \u9519\u8bef\u7c7b\u578b\uff08\u9519\u8bef\u7ea7\u522b\uff09<\/strong><\/h2>\n\n\n\n<p>PHP \u5177\u6709\u591a\u4e2a\u9519\u8bef\u7ea7\u522b\uff0c\u6bcf\u79cd\u7ea7\u522b\u4ee3\u8868\u4e0d\u540c\u7684\u4e25\u91cd\u7a0b\u5ea6\u3002\u4ee5\u4e0b\u662f\u5e38\u89c1\u7684\u9519\u8bef\u7ea7\u522b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><strong>\u9519\u8bef\u7ea7\u522b<\/strong><\/th><th><strong>\u8bf4\u660e<\/strong><\/th><\/tr><\/thead><tbody><tr><td><code>E_ERROR<\/code><\/td><td><strong>\u81f4\u547d\u9519\u8bef<\/strong>\uff0c\u811a\u672c\u7ec8\u6b62\u6267\u884c<\/td><\/tr><tr><td><code>E_WARNING<\/code><\/td><td><strong>\u8b66\u544a<\/strong>\uff0c\u4e0d\u4f1a\u7ec8\u6b62\u811a\u672c\uff0c\u4f46\u53ef\u80fd\u4f1a\u5bfc\u81f4\u95ee\u9898<\/td><\/tr><tr><td><code>E_NOTICE<\/code><\/td><td><strong>\u901a\u77e5<\/strong>\uff0c\u53ef\u80fd\u7684\u4ee3\u7801\u903b\u8f91\u9519\u8bef<\/td><\/tr><tr><td><code>E_PARSE<\/code><\/td><td><strong>\u89e3\u6790\u9519\u8bef<\/strong>\uff0c\u901a\u5e38\u7531\u8bed\u6cd5\u9519\u8bef\u5f15\u8d77<\/td><\/tr><tr><td><code>E_DEPRECATED<\/code><\/td><td><strong>\u4e0d\u63a8\u8350\u4f7f\u7528<\/strong>\uff0c\u8868\u793a\u67d0\u4e9b\u51fd\u6570\u6216\u7279\u6027\u5c06\u88ab\u5e9f\u5f03<\/td><\/tr><tr><td><code>E_STRICT<\/code><\/td><td><strong>\u5f3a\u5236\u6807\u51c6<\/strong>\uff0c\u5efa\u8bae\u6539\u8fdb\u4ee3\u7801\u4ee5\u7b26\u5408 PHP \u89c4\u8303<\/td><\/tr><tr><td><code>E_ALL<\/code><\/td><td><strong>\u6240\u6709\u9519\u8bef<\/strong>\uff08\u4e0d\u5305\u62ec <code>E_STRICT<\/code>\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u4f7f\u7528 <code>error_reporting()<\/code> \u8bbe\u5b9a PHP \u9519\u8bef\u7ea7\u522b\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>error_reporting(E_ALL &amp; ~E_NOTICE); \/\/ \u62a5\u544a\u6240\u6709\u9519\u8bef\uff0c\u4f46\u5ffd\u7565 NOTICE \u7ea7\u522b<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. \u663e\u793a\u9519\u8bef\u4e0e\u8bb0\u5f55\u65e5\u5fd7<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(1) \u663e\u793a\u9519\u8bef<\/strong><\/h3>\n\n\n\n<p>\u5728\u5f00\u53d1\u73af\u5883\u4e0b\uff0c\u901a\u5e38\u9700\u8981\u663e\u793a\u9519\u8bef\u4fe1\u606f\uff0c\u4ee5\u4fbf\u8c03\u8bd5\u95ee\u9898\u3002\u53ef\u4ee5\u4f7f\u7528 <code>display_errors<\/code> \u8bbe\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ini_set('display_errors', 1);\nerror_reporting(E_ALL);<\/code><\/pre>\n\n\n\n<p>\u5728 <code>php.ini<\/code> \u4e2d\u4e5f\u53ef\u4ee5\u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>display_errors = On\nerror_reporting = E_ALL<\/code><\/pre>\n\n\n\n<p>\ud83d\udccc <strong>\u751f\u4ea7\u73af\u5883\uff08\u7ebf\u4e0a\u73af\u5883\uff09\u5e94\u7981\u7528\u9519\u8bef\u663e\u793a\uff0c\u4ee5\u9632\u6b62\u6cc4\u9732\u654f\u611f\u4fe1\u606f<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ini_set('display_errors', 0);<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>(2) \u8bb0\u5f55\u9519\u8bef\u65e5\u5fd7<\/strong><\/h3>\n\n\n\n<p>\u5728\u751f\u4ea7\u73af\u5883\u4e0b\uff0c\u63a8\u8350\u5c06\u9519\u8bef\u8bb0\u5f55\u5230\u65e5\u5fd7\u6587\u4ef6\uff0c\u800c\u4e0d\u662f\u76f4\u63a5\u663e\u793a\u5728\u9875\u9762\u4e0a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ini_set('log_errors', 1);\nini_set('error_log', '\/var\/log\/php_errors.log');\nerror_reporting(E_ALL);<\/code><\/pre>\n\n\n\n<p>\u5728 <code>php.ini<\/code> \u914d\u7f6e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>log_errors = On\nerror_log = \/var\/log\/php_errors.log<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u4f7f\u7528 <code>try-catch<\/code> \u5904\u7406\u5f02\u5e38<\/strong><\/h2>\n\n\n\n<p>PHP \u63d0\u4f9b\u4e86 <code>try-catch<\/code> \u673a\u5236\u6765\u6355\u83b7\u5f02\u5e38\uff0c\u786e\u4fdd\u5e94\u7528\u7a0b\u5e8f\u4e0d\u4f1a\u56e0\u81f4\u547d\u9519\u8bef\u800c\u5d29\u6e83\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u6355\u83b7\u5f02\u5e38<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function divide($a, $b) {\n    if ($b == 0) {\n        throw new Exception(\"\u9664\u6570\u4e0d\u80fd\u4e3a\u96f6\");\n    }\n    return $a \/ $b;\n}\n\ntry {\n    echo divide(10, 0);\n} catch (Exception $e) {\n    echo \"\u6355\u83b7\u5230\u5f02\u5e38: \" . $e-&gt;getMessage();\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u591a\u4e2a <code>catch<\/code> \u5904\u7406\u4e0d\u540c\u5f02\u5e38<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>try {\n    throw new RuntimeException(\"\u8fd0\u884c\u65f6\u5f02\u5e38\");\n} catch (InvalidArgumentException $e) {\n    echo \"\u53c2\u6570\u5f02\u5e38: \" . $e-&gt;getMessage();\n} catch (RuntimeException $e) {\n    echo \"\u8fd0\u884c\u65f6\u5f02\u5e38: \" . $e-&gt;getMessage();\n} catch (Exception $e) {\n    echo \"\u901a\u7528\u5f02\u5e38: \" . $e-&gt;getMessage();\n}<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406<\/strong><\/h2>\n\n\n\n<p>\u53ef\u4ee5\u4f7f\u7528 <code>set_error_handler()<\/code> \u5b9a\u4e49\u81ea\u5df1\u7684\u9519\u8bef\u5904\u7406\u51fd\u6570\uff0c\u5c06\u9519\u8bef\u8f6c\u6362\u4e3a\u5f02\u5e38\uff0c\u6216\u8005\u8bb0\u5f55\u9519\u8bef\u65e5\u5fd7\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u51fd\u6570<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function customErrorHandler($errno, $errstr, $errfile, $errline) {\n    $logMessage = \"\u9519\u8bef\u7ea7\u522b: &#91;$errno] $errstr - $errfile:$errline\\n\";\n    error_log($logMessage, 3, \"\/var\/log\/php_custom_errors.log\");\n\n    if ($errno == E_USER_ERROR) {\n        echo \"\u81f4\u547d\u9519\u8bef\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002\";\n        exit();\n    }\n    return true;\n}\n\n\/\/ \u8bbe\u7f6e\u81ea\u5b9a\u4e49\u9519\u8bef\u5904\u7406\u51fd\u6570\nset_error_handler(\"customErrorHandler\");\n\n\/\/ \u89e6\u53d1\u9519\u8bef\necho $undefined_variable; \/\/ \u89e6\u53d1 NOTICE\ntrigger_error(\"\u81ea\u5b9a\u4e49\u8b66\u544a\", E_USER_WARNING);<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u81ea\u5b9a\u4e49\u5f02\u5e38\u5904\u7406<\/strong><\/h2>\n\n\n\n<p>\u9664\u4e86 <code>set_error_handler()<\/code>\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 <code>set_exception_handler()<\/code> \u5904\u7406\u672a\u6355\u83b7\u7684\u5f02\u5e38\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u793a\u4f8b\uff1a\u81ea\u5b9a\u4e49\u5f02\u5e38\u5904\u7406<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>function customExceptionHandler($exception) {\n    $errorMsg = \"\u672a\u6355\u83b7\u5f02\u5e38: \" . $exception-&gt;getMessage() . \"\\n\";\n    error_log($errorMsg, 3, \"\/var\/log\/php_custom_exceptions.log\");\n    echo \"\u7cfb\u7edf\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\uff01\";\n}\n\n\/\/ \u8bbe\u7f6e\u81ea\u5b9a\u4e49\u5f02\u5e38\u5904\u7406\u51fd\u6570\nset_exception_handler(\"customExceptionHandler\");\n\n\/\/ \u89e6\u53d1\u5f02\u5e38\nthrow new Exception(\"\u6570\u636e\u5e93\u8fde\u63a5\u5931\u8d25\");<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>6. \u7ec8\u6b62\u811a\u672c\u65f6\u6267\u884c\uff08<code>register_shutdown_function<\/code>\uff09<\/strong><\/h2>\n\n\n\n<p>PHP \u63d0\u4f9b <code>register_shutdown_function()<\/code>\uff0c\u53ef\u4ee5\u5728\u811a\u672c\u7ec8\u6b62\u65f6\u6267\u884c\u7279\u5b9a\u4ee3\u7801\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>function shutdownHandler() {\n    $error = error_get_last();\n    if ($error &amp;&amp; $error&#91;'type'] === E_ERROR) {\n        error_log(\"\u81f4\u547d\u9519\u8bef: {$error&#91;'message']} in {$error&#91;'file']} on line {$error&#91;'line']}\", 3, \"\/var\/log\/php_shutdown_errors.log\");\n        echo \"\u7cfb\u7edf\u53d1\u751f\u9519\u8bef\uff0c\u8bf7\u7a0d\u540e\u518d\u8bd5\u3002\";\n    }\n}\n\n\/\/ \u6ce8\u518c\u7ec8\u6b62\u5904\u7406\u51fd\u6570\nregister_shutdown_function(\"shutdownHandler\");<\/code><\/pre>\n\n\n\n<p><strong>\u7528\u9014\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8bb0\u5f55 <strong>\u81f4\u547d\u9519\u8bef<\/strong>\uff08<code>E_ERROR<\/code>\uff09\u5bfc\u81f4\u7684\u811a\u672c\u7ec8\u6b62<\/li>\n\n\n\n<li>\u53d1\u9001\u9519\u8bef\u901a\u77e5\uff08\u5982\u90ae\u4ef6\u3001Slack \u62a5\u8b66\uff09<\/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\"><strong>7. PHP7 \u53ca\u4ee5\u4e0a\u7684\u9519\u8bef\u5904\u7406<\/strong><\/h2>\n\n\n\n<p>PHP 7 \u5f15\u5165\u4e86 <code>Error<\/code> \u7c7b\uff0c\u4f7f\u9519\u8bef\u53ef\u4ee5\u50cf\u5f02\u5e38\u4e00\u6837\u88ab\u6355\u83b7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>try {\n    nonExistentFunction(); \/\/ \u8c03\u7528\u4e0d\u5b58\u5728\u7684\u51fd\u6570\n} catch (Error $e) {\n    echo \"\u6355\u83b7\u5230\u9519\u8bef: \" . $e-&gt;getMessage();\n}<\/code><\/pre>\n\n\n\n<p>\u8fd9\u6837\uff0c\u5373\u4f7f\u662f\u81f4\u547d\u9519\u8bef\uff0c\u4e5f\u4e0d\u4f1a\u76f4\u63a5\u7ec8\u6b62\u811a\u672c\uff0c\u800c\u662f\u53ef\u4ee5\u8fdb\u884c\u9002\u5f53\u7684\u5904\u7406\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>8. \u7ed3\u5408\u65e5\u5fd7\u8bb0\u5f55\uff08Monolog\uff09<\/strong><\/h2>\n\n\n\n<p>\u5728\u590d\u6742\u5e94\u7528\u4e2d\uff0c\u5efa\u8bae\u4f7f\u7528 <strong>Monolog<\/strong> \u8fdb\u884c\u65e5\u5fd7\u7ba1\u7406\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer require monolog\/monolog<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>use Monolog\\Logger;\nuse Monolog\\Handler\\StreamHandler;\n\n$log = new Logger('app');\n$log-&gt;pushHandler(new StreamHandler('\/var\/log\/app.log', Logger::WARNING));\n\n$log-&gt;warning('\u8fd9\u662f\u4e00\u6761\u8b66\u544a\u65e5\u5fd7');\n$log-&gt;error('\u8fd9\u662f\u4e00\u6761\u9519\u8bef\u65e5\u5fd7');<\/code><\/pre>\n\n\n\n<p>\ud83d\udccc <strong>Monolog \u652f\u6301 Slack\u3001\u6570\u636e\u5e93\u7b49\u591a\u79cd\u65e5\u5fd7\u5b58\u50a8\u65b9\u5f0f<\/strong>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>9. \u9519\u8bef\u5904\u7406\u6700\u4f73\u5b9e\u8df5<\/strong><\/h2>\n\n\n\n<p>\u2705 <strong>\u5f00\u53d1\u73af\u5883<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>display_errors = On<\/code><\/li>\n\n\n\n<li><code>error_reporting = E_ALL<\/code><\/li>\n\n\n\n<li><code>log_errors = On<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u2705 <strong>\u751f\u4ea7\u73af\u5883<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>display_errors = Off<\/code><\/li>\n\n\n\n<li><code>error_reporting = E_ALL &amp; ~E_NOTICE &amp; ~E_DEPRECATED<\/code><\/li>\n\n\n\n<li><code>log_errors = On<\/code>\uff08\u5199\u5165\u65e5\u5fd7\uff09<\/li>\n<\/ul>\n\n\n\n<p>\u2705 <strong>\u63a8\u8350<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 <code>try-catch<\/code> \u5904\u7406\u5f02\u5e38<\/li>\n\n\n\n<li>\u914d\u7f6e <code>set_error_handler()<\/code> \u5904\u7406\u975e\u81f4\u547d\u9519\u8bef<\/li>\n\n\n\n<li>\u914d\u7f6e <code>set_exception_handler()<\/code> \u5904\u7406\u672a\u6355\u83b7\u5f02\u5e38<\/li>\n\n\n\n<li><code>register_shutdown_function()<\/code> \u6355\u83b7 <code>E_ERROR<\/code><\/li>\n\n\n\n<li>\u4f7f\u7528 <code>Monolog<\/code> \u8fdb\u884c\u9ad8\u7ea7\u65e5\u5fd7\u7ba1\u7406<\/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\"><strong>\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u65b9\u6848<\/th><th>\u8bf4\u660e<\/th><\/tr><\/thead><tbody><tr><td><code>try-catch<\/code><\/td><td>\u6355\u83b7\u5f02\u5e38 (<code>Exception<\/code>)<\/td><\/tr><tr><td><code>set_error_handler()<\/code><\/td><td>\u5904\u7406\u81ea\u5b9a\u4e49\u9519\u8bef<\/td><\/tr><tr><td><code>set_exception_handler()<\/code><\/td><td>\u5904\u7406\u672a\u6355\u83b7\u5f02\u5e38<\/td><\/tr><tr><td><code>register_shutdown_function()<\/code><\/td><td>\u6355\u83b7\u81f4\u547d\u9519\u8bef (<code>E_ERROR<\/code>)<\/td><\/tr><tr><td><code>error_log()<\/code><\/td><td>\u8bb0\u5f55\u9519\u8bef\u65e5\u5fd7<\/td><\/tr><tr><td><code>Monolog<\/code><\/td><td>\u9ad8\u7ea7\u65e5\u5fd7\u7ba1\u7406<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u8fd9\u6837\u53ef\u4ee5 <strong>\u63d0\u5347 PHP \u5e94\u7528\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027<\/strong>\uff0c\u907f\u514d\u56e0\u9519\u8bef\u5bfc\u81f4\u7a0b\u5e8f\u5d29\u6e83\u3002\u66f4\u591a\u8be6\u7ec6\u5185\u5bb9\u8bf7\u5173\u6ce8\u5176\u4ed6\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u63d0\u4f9b\u4e86\u591a\u79cd\u9519\u8bef\u5904\u7406\u673a\u5236\uff0c\u786e\u4fdd\u5728\u5e94\u7528\u7a0b\u5e8f\u53d1\u751f\u9519\u8bef\u65f6\uff0c\u80fd\u591f\u6b63\u786e\u5730 \u6355\u83b7\u3001\u8bb0\u5f55\u3001\u663e\u793a \u5e76\u91c7\u53d6\u9002\u5f53\u7684\u5904\u7406\u63aa\u65bd\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3064,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80],"tags":[],"class_list":["post-3063","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3063","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=3063"}],"version-history":[{"count":1,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3063\/revisions"}],"predecessor-version":[{"id":3065,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/posts\/3063\/revisions\/3065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media\/3064"}],"wp:attachment":[{"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/media?parent=3063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/categories?post=3063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.laixuexila.com\/index.php\/wp-json\/wp\/v2\/tags?post=3063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}