{"id":202446,"date":"2025-05-13T14:33:02","date_gmt":"2025-05-13T06:33:02","guid":{"rendered":"https:\/\/server.hk\/cnblog\/202446\/"},"modified":"2025-05-13T14:33:02","modified_gmt":"2025-05-13T06:33:02","slug":"php-%e5%b8%b8%e8%a7%81%e9%94%99%e8%af%af%ef%bc%9a%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/202446\/","title":{"rendered":"PHP \u5e38\u89c1\u9519\u8bef\uff1a\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>PHP \u5e38\u89c1\u9519\u8bef\uff1a\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848<\/h1>\n<p><span style=\"cursor: pointer\"><i><\/i>\u6536\u85cf<\/span> <\/p>\n<p>IT\u884c\u4e1a\u76f8\u5bf9\u4e8e\u4e00\u822c\u4f20\u7edf\u884c\u4e1a\uff0c\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u66f4\u5feb\uff0c\u4e00\u65e6\u505c\u6b62\u4e86\u5b66\u4e60\uff0c\u5f88\u5feb\u5c31\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8e0f\u8e0f\u5b9e\u5b9e\u7684\u4e0d\u65ad\u5b66\u4e60\uff0c\u7cbe\u8fdb\u81ea\u5df1\u7684\u6280\u672f\uff0c\u5c24\u5176\u662f\u521d\u5b66\u8005\u3002\u4eca\u5929\u7ed9\u5927\u5bb6\u6574\u7406\u4e86\u300aPHP \u5e38\u89c1\u9519\u8bef\uff1a\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u300b\uff0c\u804a\u804a\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241017\/1729171665671110d108b39.jpg\" class=\"aligncenter\"><\/p>\n<p>php \u662f\u4e00\u79cd\u5e7f\u6cdb\u7528\u4e8e web \u5f00\u53d1\u7684\u5f3a\u5927\u811a\u672c\u8bed\u8a00\uff0c\u4f46\u4e0e\u4efb\u4f55\u8bed\u8a00\u4e00\u6837\uff0c\u5b83\u5f88\u5bb9\u6613\u9047\u5230\u9519\u8bef\uff0c\u800c\u8c03\u8bd5\u8d77\u6765\u4f1a\u4ee4\u4eba\u6cae\u4e27\u3002\u867d\u7136\u6709\u4e9b\u9519\u8bef\u5f88\u7b80\u5355\u4e14\u6613\u4e8e\u4fee\u590d\uff0c\u4f46\u5176\u4ed6\u9519\u8bef\u53ef\u80fd\u4f1a\u7a0d\u5fae\u590d\u6742\u4e00\u4e9b\u3002\u672c\u6587\u6db5\u76d6\u4e86\u4e00\u4e9b\u6700<strong>\u5e38\u89c1\u7684 php \u9519\u8bef<\/strong>\uff0c\u5e76\u63d0\u4f9b\u4e86\u5e2e\u52a9\u60a8\u5feb\u901f\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u7684\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<h2> 1. <strong>\u8bed\u6cd5\u9519\u8bef<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53 php \u89e3\u91ca\u5668\u9047\u5230\u4e0d\u7b26\u5408\u9884\u671f\u7ed3\u6784\u7684\u4ee3\u7801\u65f6\uff0c\u5c31\u4f1a\u53d1\u751f\u8bed\u6cd5\u9519\u8bef\u3002\u8fd9\u4e9b\u662f\u6700\u57fa\u672c\u7684\u9519\u8bef\u7c7b\u578b\uff0c\u901a\u5e38\u4f1a\u5bfc\u81f4\u53ef\u6015\u7684\u89e3\u6790\u9519\u8bef\uff1a\u8bed\u6cd5\u9519\u8bef\u3001\u610f\u5916\u7684\u4ee4\u724c\u6d88\u606f\u3002<\/p>\n<h3> \u5e38\u89c1\u539f\u56e0\uff1a <\/h3>\n<ul>\n<li>\u7f3a\u5c11\u5206\u53f7 (;)<\/li>\n<li>\u4e0d\u5339\u914d\u7684\u5706\u62ec\u53f7\u3001\u82b1\u62ec\u53f7\u6216\u4e2d\u62ec\u53f7<\/li>\n<li>\u5f15\u53f7\u7684\u9519\u8bef\u4f7f\u7528<\/li>\n<li>\u5173\u952e\u5b57\u62fc\u5199\u9519\u8bef<\/li>\n<\/ul>\n<h3> \u4f8b\u5b50\uff1a <\/h3>\n<pre>echo \"hello world\" \/\/ missing semicolon\n<\/pre>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u4ed4\u7ec6\u68c0\u67e5\u60a8\u7684\u4ee3\u7801\u662f\u5426\u7f3a\u5c11\u6216\u591a\u4f59\u7684\u6807\u70b9\u7b26\u53f7\u3002\u786e\u4fdd\u6240\u6709\u5de6\u62ec\u53f7\u3001\u53f3\u62ec\u53f7\u548c\u5f15\u53f7\u90fd\u5339\u914d\u3002<\/p>\n<pre>echo \"hello world\"; \/\/ fixed\n<\/pre>\n<h2> 2. <strong>\u672a\u5b9a\u4e49\u53d8\u91cf\u9519\u8bef<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u60a8\u5c1d\u8bd5\u4f7f\u7528\u5c1a\u672a\u521d\u59cb\u5316\u7684\u53d8\u91cf\u65f6\uff0c\u4f1a\u51fa\u73b0\u201c\u672a\u5b9a\u4e49\u53d8\u91cf\u201d\u9519\u8bef\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0cphp \u4f1a\u629b\u51fa\u4e00\u4e2anotice: undefined variable \u9519\u8bef\u3002<\/p>\n<h3> \u4f8b\u5b50\uff1a <\/h3>\n<pre>echo $username; \/\/ undefined variable\n<\/pre>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u786e\u4fdd\u53d8\u91cf\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528\u4e4b\u524d\u5df2\u521d\u59cb\u5316\u3002\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u53d8\u91cf\u662f\u5426\u4f7f\u7528 isset() \u8bbe\u7f6e\u6765\u6291\u5236\u6b64\u901a\u77e5\u3002<\/p>\n<pre>if (isset($username)) {\n    echo $username;\n} else {\n    echo \"no username provided\";\n}\n<\/pre>\n<h2> 3. <strong>\u81f4\u547d\u9519\u8bef\uff1a\u8c03\u7528\u672a\u5b9a\u4e49\u7684\u51fd\u6570<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u60a8\u5c1d\u8bd5\u8c03\u7528\u5c1a\u672a\u5b9a\u4e49\u7684\u51fd\u6570\u65f6\uff0c\u4f1a\u53d1\u751f\u6b64\u9519\u8bef\u3002\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u7684\u539f\u56e0\u53ef\u80fd\u662f\u60a8\u62fc\u9519\u4e86\u51fd\u6570\u540d\u79f0\u6216\u5fd8\u8bb0\u5305\u542b\u5305\u542b\u8be5\u51fd\u6570\u7684\u5fc5\u8981\u6587\u4ef6\u3002<\/p>\n<h3> \u4f8b\u5b50\uff1a <\/h3>\n<pre>myfunction(); \/\/ undefined function\n<\/pre>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u786e\u4fdd\u8be5\u51fd\u6570\u5df2\u6b63\u786e\u5b9a\u4e49\u6216\u5305\u542b\u5728\u811a\u672c\u4e2d\u3002\u53e6\u5916\uff0c\u68c0\u67e5\u51fd\u6570\u540d\u79f0\u4e2d\u662f\u5426\u6709\u62fc\u5199\u9519\u8bef\u3002<\/p>\n<pre>function myfunction() {\n    echo \"hello world!\";\n}\n\nmyfunction(); \/\/ fixed\n<\/pre>\n<h2> 4. <strong>\u6807\u5934\u5df2\u53d1\u9001<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u8f93\u51fa\u5df2\u53d1\u9001\u5230\u6d4f\u89c8\u5668\u540e php \u5c1d\u8bd5\u4fee\u6539\u6807\u5934\uff08\u4f8b\u5982\uff0c\u4f7f\u7528 header() \u6216 setcookie()\uff09\u65f6\uff0c\u4f1a\u53d1\u751f\u6b64\u9519\u8bef\u3002\u9519\u8bef\u6d88\u606f\u901a\u5e38\u5982\u4e0b\u6240\u793a\uff1a\u8b66\u544a\uff1a\u65e0\u6cd5\u4fee\u6539\u6807\u5934\u4fe1\u606f &#8211; \u6807\u5934\u5df2\u7531&#8230;\u53d1\u9001<\/p>\n<h3> \u4f8b\u5b50\uff1a <\/h3>\n<pre>echo \"some output\";\nheader(\"location: \/newpage.php\"); \/\/ causes error because output was already sent\n<\/pre>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u786e\u4fdd\u5728\u8c03\u7528 header() \u51fd\u6570\u4e4b\u524d\u6ca1\u6709\u53d1\u9001\u4efb\u4f55\u8f93\u51fa\uff08\u5305\u62ec\u7a7a\u683c\u6216 bom\uff09\u3002\u5982\u679c\u60a8\u9700\u8981\u91cd\u5b9a\u5411\u7528\u6237\uff0c\u8bf7\u786e\u4fdd\u5728\u751f\u6210\u4efb\u4f55\u8f93\u51fa\u4e4b\u524d\u8c03\u7528 header()\u3002<\/p>\n<pre>header(\"location: \/newpage.php\"); \/\/ this must appear before any echo or print statements\nexit();\n<\/pre>\n<h2> 5. <strong>\u6743\u9650\u4e0d\u6b63\u786e<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u60a8\u7684 php \u811a\u672c\u6ca1\u6709\u8bbf\u95ee\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6b63\u786e\u8bfb\u53d6\u6216\u5199\u5165\u6743\u9650\u65f6\uff0c\u5c31\u4f1a\u53d1\u751f\u6743\u9650\u9519\u8bef\u3002\u60a8\u53ef\u80fd\u4f1a\u770b\u5230\u7c7b\u4f3c\u8b66\u544a\uff1afopen\uff08\/path\/to\/file\uff09\uff1a\u65e0\u6cd5\u6253\u5f00\u6d41\uff1a\u6743\u9650\u88ab\u62d2\u7edd\u7684\u9519\u8bef\u3002<\/p>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u68c0\u67e5\u6587\u4ef6\u548c\u76ee\u5f55\u6743\u9650\u3002\u901a\u5e38\uff0cweb \u670d\u52a1\u5668\u7528\u6237\u5e94\u5bf9\u6587\u4ef6\u5177\u6709\u8bfb\u53d6\u6743\u9650\uff0c\u5e76\u5bf9\u53d1\u751f\u4e0a\u4f20\u6216\u6587\u4ef6\u64cd\u4f5c\u7684\u76ee\u5f55\u5177\u6709\u5199\u5165\u6743\u9650\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8c03\u6574\u6743\u9650\uff1a<\/p>\n<pre>chmod 755 \/path\/to\/directory\nchmod 644 \/path\/to\/file\n<\/pre>\n<p>\u6ce8\u610f\uff1a\u8bbe\u7f6e\u6743\u9650\u65f6\u8bf7\u8c28\u614e\uff0c\u8fc7\u4e8e\u5bbd\u677e\u7684\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5e26\u6765\u5b89\u5168\u98ce\u9669\u3002<\/p>\n<h2> 6. <strong>\u5185\u5b58\u9650\u5236\u5df2\u8017\u5c3d<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53 php \u8017\u5c3d\u5206\u914d\u7684\u5185\u5b58\u65f6\uff0c\u60a8\u5c06\u770b\u5230\u81f4\u547d\u9519\u8bef\uff1a\u5141\u8bb8\u7684\u5185\u5b58\u5927\u5c0f x \u5b57\u8282\u8017\u5c3d\u9519\u8bef\u3002\u5f53\u811a\u672c\u4f7f\u7528\u7684\u5185\u5b58\u8d85\u8fc7 php.ini \u4e2d\u8bbe\u7f6e\u7684\u9650\u5236\u65f6\uff0c\u5c31\u4f1a\u53d1\u751f\u8fd9\u79cd\u60c5\u51b5\u3002<\/p>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u5c06\u4ee5\u4e0b\u884c\u6dfb\u52a0\u5230 php \u811a\u672c\u6765\u4e34\u65f6\u589e\u52a0\u5185\u5b58\u9650\u5236\uff1a<\/p>\n<pre>ini_set('memory_limit', '256m'); \/\/ adjust as needed\n<\/pre>\n<p>\u6216\u8005\uff0c\u60a8\u53ef\u4ee5\u6c38\u4e45\u589e\u52a0 php.ini \u6587\u4ef6\u4e2d\u7684\u5185\u5b58\u9650\u5236\uff1a<\/p>\n<pre>memory_limit = 256m\n<\/pre>\n<p>\u786e\u4fdd\u4f18\u5316\u60a8\u7684\u4ee3\u7801\u4ee5\u5c3d\u53ef\u80fd\u51cf\u5c11\u5185\u5b58\u4f7f\u7528\u3002<\/p>\n<h2> 7. <strong>mysql \u8fde\u63a5\u9519\u8bef<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u8fde\u63a5\u5230 mysql \u6570\u636e\u5e93\u6709\u65f6\u4f1a\u5931\u8d25\uff0c\u5bfc\u81f4\u51fa\u73b0\u4ee5\u4e0b\u9519\u8bef\uff1a fatal error: uncaught mysqli_sql_exception: access denied for user &#8216;username&#8217;@&#8217;localhost&#8217;.<\/p>\n<h3> \u5e38\u89c1\u539f\u56e0\uff1a <\/h3>\n<ul>\n<li>\u6570\u636e\u5e93\u51ed\u636e\u4e0d\u6b63\u786e\uff08\u4e3b\u673a\u540d\u3001\u7528\u6237\u540d\u3001\u5bc6\u7801\u3001\u6570\u636e\u5e93\u540d\u79f0\uff09<\/li>\n<li>mysql \u670d\u52a1\u5668\u672a\u8fd0\u884c<\/li>\n<li>\u4e0d\u6b63\u786e\u7684 php mysql \u6269\u5c55\uff08\u4f8b\u5982\uff0c\u4f7f\u7528 mysql_connect() \u800c\u4e0d\u662f mysqli_connect()\uff09<\/li>\n<\/ul>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u786e\u4fdd\u60a8\u7684\u51ed\u636e\u6b63\u786e\u5e76\u4e14 mysql \u670d\u52a1\u5668\u6b63\u5728\u8fd0\u884c\u3002\u53e6\u5916\uff0c\u8bf7\u786e\u4fdd\u4f7f\u7528\u9002\u5f53\u7684\u8fde\u63a5\u529f\u80fd\u3002\u8fd9\u662f\u4f7f\u7528 mysqli_connect() \u7684\u6b63\u786e\u793a\u4f8b\uff1a<\/p>\n<pre>$mysqli = new mysqli('localhost', 'username', 'password', 'database');\n\nif ($mysqli-&gt;connect_error) {\n    die(\"connection failed: \" . $mysqli-&gt;connect_error);\n}\n<\/pre>\n<h2> 8. <strong>\u6587\u4ef6\u4e0a\u4f20\u9519\u8bef<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u6587\u4ef6\u4e0a\u4f20\u7ecf\u5e38\u56e0\u8bbe\u7f6e\u4e0d\u5f53\u6216\u6587\u4ef6\u5927\u5c0f\u9650\u5236\u800c\u5931\u8d25\u3002\u60a8\u53ef\u80fd\u4f1a\u9047\u5230 upload_err_ini_size \u6216 upload_err_form_size \u7b49\u9519\u8bef\u3002<\/p>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u6839\u636e\u9700\u8981\u68c0\u67e5\u5e76\u8c03\u6574\u4ee5\u4e0b php.ini \u8bbe\u7f6e\uff1a<\/p>\n<pre>file_uploads = on\nupload_max_filesize = 10m\npost_max_size = 12m\n<\/pre>\n<p>\u6b64\u5916\uff0c\u8bf7\u786e\u4fdd\u60a8\u7684\u8868\u5355\u6807\u7b7e\u5177\u6709\u6b63\u786e\u7684 enctype \u5c5e\u6027\uff1a<\/p>\n<pre>&lt;form action=\"upload.php\" method=\"post\" enctype=\"multipart\/form-data\"&gt;\n    &lt;input type=\"file\" name=\"file\"&gt;\n    &lt;input type=\"submit\" value=\"upload\"&gt;\n&lt;\/form&gt;\n<\/pre>\n<h2> 9. <strong>\u672a\u5b9a\u4e49\u7d22\u5f15\/\u504f\u79fb<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u60a8\u5c1d\u8bd5\u8bbf\u95ee\u4e0d\u5b58\u5728\u7684\u6570\u7ec4\u5143\u7d20\u65f6\uff0c\u4f1a\u51fa\u73b0\u6b64\u901a\u77e5\uff0c\u5bfc\u81f4 notice: undefined index \u6216 notice: undefined offset \u9519\u8bef\u3002<\/p>\n<h3> \u4f8b\u5b50\uff1a <\/h3>\n<pre>echo $_post['username']; \/\/ undefined index if 'username' is not in the form data\n<\/pre>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u5728\u5c1d\u8bd5\u8bbf\u95ee\u6570\u7ec4\u952e\u4e4b\u524d\u59cb\u7ec8\u68c0\u67e5\u5b83\u662f\u5426\u5b58\u5728\u3002\u4f7f\u7528 isset() \u6216 array_key_exists() \u6765\u9632\u6b62\u6b64\u9519\u8bef\u3002<\/p>\n<pre>if (isset($_post['username'])) {\n    echo $_post['username'];\n} else {\n    echo \"username not provided.\";\n}\n<\/pre>\n<h2> 10. <strong>\u627e\u4e0d\u5230\u7c7b<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5f53\u60a8\u5c1d\u8bd5\u5b9e\u4f8b\u5316\u5c1a\u672a\u6b63\u786e\u5b9a\u4e49\u6216\u5305\u542b\u7684\u7c7b\u65f6\uff0cphp \u4f1a\u629b\u51fa\u81f4\u547d\u9519\u8bef\uff1a\u672a\u627e\u5230\u7c7b\u201cclassname\u201d\u9519\u8bef\u3002<\/p>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u786e\u4fdd\u4f7f\u7528 require() \u6216 include() \u5305\u542b\u5305\u542b\u8be5\u7c7b\u7684\u6587\u4ef6\u3002\u6216\u8005\uff0c\u4f7f\u7528 php \u7684 spl_autoload_register() \u51fd\u6570\u81ea\u52a8\u52a0\u8f7d\u7c7b\u6587\u4ef6\u3002<\/p>\n<pre>spl_autoload_register(function ($class_name) {\n    include $class_name . '.php';\n});\n\n$object = new classname();\n<\/pre>\n<h2> 11. <strong>\u8d85\u8fc7\u6700\u5927\u6267\u884c\u65f6\u95f4<\/strong> <\/h2>\n<h3> \u95ee\u9898\uff1a <\/h3>\n<p>\u5982\u679c\u60a8\u7684 php \u811a\u672c\u6267\u884c\u65f6\u95f4\u8fc7\u957f\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230 fatal error: maximumexecutiontime of x\u79d2\u8d85\u8fc7\u9519\u8bef\u3002\u8fd9\u901a\u5e38\u53d1\u751f\u5728\u5904\u7406\u5927\u578b\u6570\u636e\u96c6\u6216\u5916\u90e8 api \u8c03\u7528\u65f6\u3002<\/p>\n<h3> \u89e3\u51b3\u65b9\u6848\uff1a <\/h3>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6682\u65f6\u589e\u52a0\u6700\u5927\u6267\u884c\u65f6\u95f4\uff1a<\/p>\n<pre>set_time_limit(300); \/\/ extends to 300 seconds (5 minutes)\n<\/pre>\n<p>\u8981\u5168\u5c40\u8bbe\u7f6e\u5b83\uff0c\u8bf7\u8c03\u6574 php.ini \u6587\u4ef6\u4e2d\u7684 max_execution_time \u6307\u4ee4\uff1a<\/p>\n<pre>max_execution_time = 300\n<\/pre>\n<p>php \u9519\u8bef\u662f\u4e0d\u53ef\u907f\u514d\u7684\uff0c\u4f46\u4e86\u89e3\u5982\u4f55\u89e3\u51b3\u6700\u5e38\u89c1\u7684\u9519\u8bef\u53ef\u4ee5\u8282\u7701\u5927\u91cf\u8c03\u8bd5\u65f6\u95f4\u3002\u65e0\u8bba\u662f\u8bed\u6cd5\u95ee\u9898\u3001\u6570\u636e\u5e93\u8fde\u63a5\u95ee\u9898\u8fd8\u662f\u6587\u4ef6\u6743\u9650\u9519\u8bef\uff0c\u4e86\u89e3\u6839\u672c\u539f\u56e0\u548c\u89e3\u51b3\u65b9\u6848\u662f\u6210\u4e3a\u719f\u7ec3 php \u5f00\u53d1\u4eba\u5458\u7684\u5173\u952e\u3002<\/p>\n<p>\u901a\u8fc7\u9075\u5faa\u672c\u6587\u4e2d\u7684\u6307\u5357\uff0c\u60a8\u5e94\u8be5\u80fd\u591f\u6709\u6548\u5730\u8bc6\u522b\u548c\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u3002\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u4fdd\u6301\u9519\u8bef\u62a5\u544a\u5904\u4e8e\u542f\u7528\u72b6\u6001\uff0c\u4ee5\u4fbf\u53ca\u65e9\u53d1\u73b0\u8fd9\u4e9b\u9519\u8bef\u5e76\u786e\u4fdd\u66f4\u987a\u7545\u7684\u7f16\u7801\uff01<\/p>\n<p>\u4eca\u5929\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u7684\u76f8\u5173\u77e5\u8bc6\uff0c\u5e0c\u671b\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff1b\u5173\u4e8e\u6587\u7ae0\u7684\u6280\u672f\u77e5\u8bc6\u6211\u4eec\u4f1a\u4e00\u70b9\u70b9\u6df1\u5165\u4ecb\u7ecd\uff0c\u6b22\u8fce\u5927\u5bb6\u5173\u6ce8\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n<p> \u7248\u672c\u58f0\u660e \u672c\u6587\u8f6c\u8f7d\u4e8e\uff1adev.to \u5982\u6709\u4fb5\u72af\uff0c\u8bf7\u8054\u7cfb \u5220\u9664<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u5e38\u89c1\u9519\u8bef\uff1a\u5e38\u89c1\u95ee\u9898\u7684\u89e3\u51b3&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-202446","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/202446","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=202446"}],"version-history":[{"count":0,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/202446\/revisions"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=202446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=202446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=202446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}