{"id":182286,"date":"2024-05-08T21:17:27","date_gmt":"2024-05-08T13:17:27","guid":{"rendered":""},"modified":"2024-05-08T21:17:32","modified_gmt":"2024-05-08T13:17:32","slug":"app%e4%b8%8a%e4%bc%a0%e5%a4%b4%e5%83%8f%ef%bc%8cphp%e4%bd%9c%e4%b8%baapi%e7%ab%af%e5%ba%94%e8%af%a5%e5%a6%82%e4%bd%95%e6%8e%a5%e6%94%b6%e5%9b%be%e7%89%87%e4%bf%a1%e6%81%af","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/182286.html","title":{"rendered":"APP\u4e0a\u4f20\u5934\u50cf\uff0cphp\u4f5c\u4e3aAPI\u7aef\u5e94\u8be5\u5982\u4f55\u63a5\u6536\u56fe\u7247\u4fe1\u606f"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/27072322\/ae142732-bb21-451c-acab-02257d5bb2b9.webp\" alt=\"APP\u4e0a\u4f20\u5934\u50cf\uff0cphp\u4f5c\u4e3aAPI\u7aef\u5e94\u8be5\u5982\u4f55\u63a5\u6536\u56fe\u7247\u4fe1\u606f\" \/><\/p>\n<p><p><strong>APP\u4e0a\u4f20\u5934\u50cf\u65f6\uff0cPHP API\u7aef\u901a\u5e38\u901a\u8fc7$_FILES\u8d85\u5168\u5c40\u53d8\u91cf\u63a5\u6536\u4f20\u9012\u8fc7\u6765\u7684\u56fe\u7247\u6587\u4ef6\u4fe1\u606f\uff0c\u7ecf\u8fc7\u6821\u9a8c\u540e\u5b58\u50a8\u81f3\u670d\u52a1\u5668\u6307\u5b9a\u4f4d\u7f6e\u3002<\/strong> \u9996\u5148\uff0cAPI\u7aef\u5e94\u8be5\u786e\u4fdd\u914d\u7f6e\u4e86\u5408\u9002\u7684\u4e0a\u4f20\u8bbe\u7f6e\uff0c\u6bd4\u5982\u5141\u8bb8\u7684\u6587\u4ef6\u5927\u5c0f\u3001\u6587\u4ef6\u7c7b\u578b\u7b49\uff0c\u5bf9\u4e0a\u4f20\u7684\u56fe\u7247\u8fdb\u884c\u5b89\u5168\u548c\u683c\u5f0f\u6821\u9a8c\uff0c\u518d\u5229\u7528\u4e00\u7cfb\u5217PHP\u51fd\u6570\u5982<code>move_uploaded_file()<\/code>\u6765\u4fdd\u5b58\u6587\u4ef6\u3002\u8be6\u7ec6\u63cf\u8ff0\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><p>\u5728\u5ba2\u6237\u7aef\u5c06\u56fe\u7247\u6587\u4ef6\u53d1\u9001\u5230\u670d\u52a1\u5668\u65f6\uff0c\u901a\u5e38\u91c7\u7528HTTP POST\u8bf7\u6c42\uff0c\u5e76\u5728\u8bf7\u6c42\u4f53\u4e2d\u4f7f\u7528<code>multipart\/form-data<\/code>\u7f16\u7801\u7c7b\u578b\uff0c\u8fd9\u6837\u80fd\u591f\u652f\u6301\u53d1\u9001\u4e8c\u8fdb\u5236\u7684\u6587\u4ef6\u6570\u636e\u3002API\u7aef\u901a\u8fc7<code>$_FILES<\/code>\u6570\u7ec4\u53ef\u4ee5\u8bbf\u95ee\u4e0a\u4f20\u7684\u6587\u4ef6\u3002<code>$_FILES<\/code>\u6570\u7ec4\u662f\u4e00\u4e2a\u4e8c\u7ef4\u6570\u7ec4\uff0c\u5305\u542b\u4e86\u591a\u4e2a\u6587\u4ef6\u4fe1\u606f\uff0c\u5982<code>tmp_name<\/code>\uff08\u4e34\u65f6\u6587\u4ef6\u540d\uff09\u3001<code>name<\/code>\uff08\u539f\u6587\u4ef6\u540d\uff09\u3001<code>size<\/code>\uff08\u6587\u4ef6\u5927\u5c0f\uff09\u3001<code>type<\/code>\uff08\u6587\u4ef6\u7c7b\u578b\uff09\u3001<code>error<\/code>\uff08\u9519\u8bef\u7801\uff09\u3002<\/p>\n<\/p>\n<p><p>\u5728\u63a5\u6536\u5230\u56fe\u7247\u540e\uff0c\u5148\u68c0\u67e5<code>error<\/code>\u5b57\u6bb5\u5224\u65ad\u662f\u5426\u6709\u9519\u8bef\u53d1\u751f\uff0c\u7136\u540e\u9a8c\u8bc1\u6587\u4ef6\u7c7b\u578b\u548c\u5c3a\u5bf8\u662f\u5426\u7b26\u5408\u8981\u6c42\u3002\u4e4b\u540e\uff0c\u901a\u8fc7<code>move_uploaded_file()<\/code>\u51fd\u6570\u5c06\u6587\u4ef6\u4ece\u4e34\u65f6\u76ee\u5f55\u79fb\u81f3\u6700\u7ec8\u76ee\u5f55\u3002\u8be5\u51fd\u6570\u4e0d\u4ec5\u79fb\u52a8\u6587\u4ef6\uff0c\u8fd8\u786e\u4fdd\u4e86\u6587\u4ef6\u7684\u5b89\u5168\u6027\uff0c\u9632\u6b62\u4e86\u6587\u4ef6\u4e0a\u4f20\u653b\u51fb\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u73af\u5883\u914d\u7f6e\u4e0e\u524d\u7f6e\u68c0\u67e5<\/h3>\n<\/p>\n<p><p>\u5728\u5b9e\u8df5\u4e2d\uff0c\u63cf\u8ff0\u914d\u7f6ePHP\u73af\u5883\u4ee5\u5141\u8bb8\u6587\u4ef6\u4e0a\u4f20\u5e38\u89c1\u4e8ephp.ini\u6587\u4ef6\u4e2d\u3002\u4f8b\u5982\uff0c\u9700\u8981\u8bbe\u7f6e<code>file_uploads<\/code>\u4e3a<code>On<\/code>\u6765\u542f\u7528\u6587\u4ef6\u4e0a\u4f20\u529f\u80fd\uff0c\u914d\u7f6e<code>upload_max_filesize<\/code>\u548c<code>post_max_size<\/code>\u6765\u9650\u5b9a\u6587\u4ef6\u548cPOST\u8bf7\u6c42\u7684\u6700\u5927\u5c3a\u5bf8\u3002<\/p>\n<\/p>\n<p><h4>\u6700\u5927\u6587\u4ef6\u4e0a\u4f20\u9650\u5236<\/h4>\n<\/p>\n<p><p>\u4fee\u6539\u6216\u786e\u8ba4php.ini\u4e2d\u4ee5\u4e0b\u8bbe\u7f6e\u9879\uff1a<\/p>\n<\/p>\n<ul>\n<li><code>file_uploads<\/code>: \u786e\u4fdd\u5176\u503c\u4e3a<code>On<\/code>\u4ee5\u542f\u7528\u6587\u4ef6\u4e0a\u4f20\u3002<\/li>\n<li><code>upload_max_filesize<\/code>: \u8bbe\u7f6e\u4e0a\u4f20\u6587\u4ef6\u7684\u6700\u5927\u5c3a\u5bf8\u3002<\/li>\n<li><code>post_max_size<\/code>: \u8bbe\u7f6ePOST\u8bf7\u6c42\u4f53\u7684\u6700\u5927\u5c3a\u5bf8\u3002<\/li>\n<\/ul>\n<p><h4>\u4e34\u65f6\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><p>\u786e\u8ba4\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u6307\u5b9a\u4e86\u7528\u4e8e\u5b58\u50a8\u4e34\u65f6\u4e0a\u4f20\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u5e76\u4e14PHP\u6709\u6743\u9650\u5199\u5165\u8be5\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e0a\u4f20API\u7f16\u5199<\/h3>\n<\/p>\n<p><p>\u4e0a\u4f20\u56fe\u7247\u7684API\u901a\u5e38\u7531\u591a\u4e2a\u6b65\u9aa4\u7ec4\u6210\uff1a\u6587\u4ef6\u63a5\u6536\u3001\u5b89\u5168\u6027\u6821\u9a8c\u3001\u670d\u52a1\u5668\u7aef\u6570\u636e\u9a8c\u8bc1\u3001\u6587\u4ef6\u5b58\u50a8\u3002<\/p>\n<\/p>\n<p><h4>\u6587\u4ef6\u63a5\u6536<\/h4>\n<\/p>\n<p><p>\u4e00\u65e6\u5ba2\u6237\u7aef\u901a\u8fc7POST\u8bf7\u6c42\u53d1\u9001\u6587\u4ef6\uff0c\u670d\u52a1\u5668\u7aef\u7684PHP\u811a\u672c\u5c31\u53ef\u4ee5\u901a\u8fc7<code>$_FILES<\/code>\u6570\u7ec4\u6765\u63a5\u6536\u8fd9\u4e9b\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-php\">if ($_SERVER[&#039;REQUEST_METHOD&#039;] == &#039;POST&#039; &amp;&amp; !empty($_FILES[&#039;profile_image&#039;])) {<\/p>\n<p>    $image = $_FILES[&#039;profile_image&#039;];<\/p>\n<p>} else {<\/p>\n<p>    \/\/ \u5904\u7406\u9519\u8bef\u60c5\u51b5<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u6587\u4ef6\u6821\u9a8c<\/h4>\n<\/p>\n<p><p>\u5b89\u5168\u6027\u6821\u9a8c\u662f\u6587\u4ef6\u4e0a\u4f20\u7684\u5fc5\u8981\u6b65\u9aa4\uff0c\u5305\u62ec\u68c0\u67e5\u6587\u4ef6\u5927\u5c0f\u3001\u6587\u4ef6\u7c7b\u578b\u7b49\u3002<strong>\u6b64\u5916\uff0c\u7edd\u4e0d\u5e94\u8be5\u4fe1\u4efb\u5ba2\u6237\u7aef\u53d1\u9001\u7684<code>type<\/code>\u5b57\u6bb5\uff0c\u800c\u5e94\u8be5\u4f7f\u7528PHP\u7684<code>getimagesize()<\/code>\u6216<code>finfo_file()<\/code>\u51fd\u6570\u6765\u786e\u5b9a\u6587\u4ef6\u7c7b\u578b\u3002<\/strong><\/p>\n<\/p>\n<p><pre><code class=\"language-php\">if ($image[&#039;error&#039;] === UPLOAD_ERR_OK) {<\/p>\n<p>    \/\/ \u9a8c\u8bc1\u6587\u4ef6\u7c7b\u578b\u7b49\u4fe1\u606f<\/p>\n<p>} else {<\/p>\n<p>    \/\/ \u6587\u4ef6\u4e0a\u4f20\u8fc7\u7a0b\u4e2d\u51fa\u9519<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u5b89\u5168\u6709\u6548\u6027\u9a8c\u8bc1<\/h3>\n<\/p>\n<p><h4>\u68c0\u67e5\u9519\u8bef<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u4e0a\u4f20\u6587\u4ef6\u7684<code>error<\/code>\u5b57\u6bb5\u6765\u68c0\u67e5\u662f\u5426\u5728\u4e0a\u4f20\u8fc7\u7a0b\u4e2d\u53d1\u751f\u4e86\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h4>\u6587\u4ef6\u5927\u5c0f\u9650\u5236<\/h4>\n<\/p>\n<p><p>\u786e\u4fdd\u6587\u4ef6\u4e0d\u8d85\u8fc7\u9884\u8bbe\u7684\u5927\u5c0f\u9650\u5236\uff0c\u5bf9\u4e8e\u5934\u50cf\u901a\u5e38\u4e0d\u9700\u8981\u592a\u5927\u7684\u56fe\u7247\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-php\">if ($image[&#039;size&#039;] &gt; YOUR_DEFINED_LIMIT) {<\/p>\n<p>    \/\/ \u6587\u4ef6\u8fc7\u5927<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u6587\u4ef6\u7c7b\u578b\u9650\u5236<\/h4>\n<\/p>\n<p><p>\u6821\u9a8c\u6587\u4ef6\u7c7b\u578b\uff0c\u786e\u4fdd\u4e0a\u4f20\u7684\u662f\u56fe\u7247\u6587\u4ef6\u3002\u53ef\u4ee5\u901a\u8fc7\u62d3\u5c55\u540d\u3001MIME\u7c7b\u578b\u4ee5\u53ca\u5b9e\u9645\u5185\u5bb9\u6765\u6821\u9a8c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-php\">$allowed_types = array(&#039;image\/jpeg&#039;, &#039;image\/png&#039;, &#039;image\/gif&#039;);<\/p>\n<p>$file_info = finfo_open(FILEINFO_MIME_TYPE);<\/p>\n<p>$mime_type = finfo_file($file_info, $image[&#039;tmp_name&#039;]);<\/p>\n<p>if (!in_array($mime_type, $allowed_types)) {<\/p>\n<p>    \/\/ \u6587\u4ef6\u7c7b\u578b\u4e0d\u7b26\u5408\u8981\u6c42<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u6587\u4ef6\u5b58\u50a8\u4e0e\u5904\u7406<\/h3>\n<\/p>\n<p><h4>\u79fb\u52a8\u4e0a\u4f20\u7684\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528<code>move_uploaded_file()<\/code>\u51fd\u6570\u5c06\u6587\u4ef6\u4ece\u5176\u4e34\u65f6\u76ee\u5f55\u79fb\u52a8\u5230\u4e00\u4e2a\u6301\u4e45\u7684\u4f4d\u7f6e\uff0c\u901a\u5e38\u662f\u670d\u52a1\u5668\u4e0a\u7684\u6307\u5b9a\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><h4>\u751f\u6210\u552f\u4e00\u6587\u4ef6\u540d<\/h4>\n<\/p>\n<p><p>\u4e3a\u4e86\u9632\u6b62\u6587\u4ef6\u540d\u51b2\u7a81\u6216\u8986\u76d6\uff0c\u53ef\u4ee5\u4e3a\u6bcf\u4e2a\u4e0a\u4f20\u7684\u5934\u50cf\u751f\u6210\u4e00\u4e2a\u552f\u4e00\u7684\u6587\u4ef6\u540d\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-php\">$unique_name = uniqid(&#039;avatar_&#039;, true) . &#039;.&#039; . pathinfo($image[&#039;name&#039;], PATHINFO_EXTENSION);<\/p>\n<p>if (move_uploaded_file($image[&#039;tmp_name&#039;], &#039;path\/to\/destination\/&#039; . $unique_name)) {<\/p>\n<p>    \/\/ \u6587\u4ef6\u4fdd\u5b58\u6210\u529f<\/p>\n<p>} else {<\/p>\n<p>    \/\/ \u6587\u4ef6\u4fdd\u5b58\u65f6\u51fa\u9519<\/p>\n<p>}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u540e\u7eed\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u6587\u4ef6\u5b58\u50a8\u540e\uff0c\u53ef\u80fd\u9700\u8981\u8fdb\u884c\u56fe\u7247\u7684\u540e\u7eed\u5904\u7406\uff0c\u5982\u8c03\u6574\u56fe\u7247\u5927\u5c0f\u3001\u88c1\u526a\u7b49\u3002\u540c\u65f6\uff0c\u5e94\u8be5\u66f4\u65b0\u7528\u6237\u8bb0\u5f55\uff0c\u5c06\u5934\u50cf\u6587\u4ef6\u8def\u5f84\u4fdd\u5b58\u5230\u6570\u636e\u5e93\u4e2d\u4f9b\u4e4b\u540e\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u9519\u8bef\u5904\u7406\u4e0e\u8fd4\u56de\u7ed3\u679c<\/h3>\n<\/p>\n<p><h4>\u9519\u8bef\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>\u5728API\u5f00\u53d1\u4e2d\uff0c\u5f53\u9047\u5230\u9519\u8bef\u5982\u6587\u4ef6\u7c7b\u578b\u4e0d\u5408\u89c4\u6216\u6587\u4ef6\u8fc7\u5927\u65f6\uff0c\u5e94\u8be5\u8fd4\u56de\u660e\u786e\u7684\u9519\u8bef\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><h4>\u6210\u529f\u54cd\u5e94<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u6587\u4ef6\u4e0a\u4f20\u3001\u9a8c\u8bc1\u548c\u5b58\u50a8\u6d41\u7a0b\u6210\u529f\uff0c\u5e94\u8be5\u8fd4\u56de\u6210\u529f\u72b6\u6001\u4ee5\u53ca\u5934\u50cf\u7684URL\u6216\u76f8\u5e94\u7684\u7528\u6237\u4fe1\u606f\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u5404\u4e2a\u73af\u8282\u7684\u7efc\u5408\u8fd0\u7528\uff0c\u53ef\u4ee5\u786e\u4fdd\u7528\u6237\u5934\u50cf\u7684\u4e0a\u4f20\u5904\u7406\u65e2\u5feb\u901f\u53c8\u5b89\u5168\u3002\u8fd9\u4e0d\u4ec5\u63d0\u4f9b\u4e86\u826f\u597d\u7684\u7528\u6237\u4f53\u9a8c\uff0c\u8fd8\u4fdd\u8bc1\u4e86\u670d\u52a1\u5668\u7aef\u7684\u7a33\u5b9a\u6027\u548c\u5b89\u5168\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u5728APP\u7aef\u4e0a\u4f20\u5934\u50cf\uff1f<\/strong><br \/>\n\u5728APP\u7aef\uff0c\u9996\u5148\u9700\u8981\u63d0\u4f9b\u4e00\u4e2a\u7528\u6237\u754c\u9762\uff0c\u8ba9\u7528\u6237\u9009\u62e9\u6216\u62cd\u6444\u4e00\u5f20\u56fe\u7247\u4f5c\u4e3a\u5934\u50cf\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u5934\u50cf\u9884\u89c8\u7684\u533a\u57df\uff0c\u6253\u5f00\u76f8\u518c\u6216\u8005\u62cd\u7167\u529f\u80fd\uff0c\u9009\u62e9\u6216\u62cd\u6444\u4e00\u5f20\u7167\u7247\u3002<\/p>\n<p><strong>2. PHP\u4f5c\u4e3aAPI\u7aef\uff0c\u5982\u4f55\u63a5\u6536\u56fe\u7247\u4fe1\u606f\uff1f<\/strong><br \/>\n\u5728PHP\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6570\u636e\u4f20\u8f93\u65b9\u5f0f\u5c06\u56fe\u7247\u4fe1\u606f\u53d1\u9001\u5230API\u7aef\u3002\u4e00\u79cd\u5e38\u7528\u7684\u65b9\u6cd5\u662f\u901a\u8fc7POST\u8bf7\u6c42\u5c06\u56fe\u7247\u6570\u636e\u4ee5\u4e8c\u8fdb\u5236\u6d41\u7684\u5f62\u5f0f\u53d1\u9001\u5230API\u7684\u6307\u5b9a\u63a5\u53e3\u3002<\/p>\n<p>\u53ef\u4ee5\u5728API\u7aef\u5efa\u7acb\u4e00\u4e2a\u63a5\u53e3\uff0c\u63a5\u6536\u5e76\u5904\u7406\u8fd9\u4e2aPOST\u8bf7\u6c42\uff0c\u5e76\u5c06\u8bf7\u6c42\u4e2d\u7684\u5185\u5bb9\uff08\u5373\u56fe\u7247\u6570\u636e\uff09\u4fdd\u5b58\u5230\u670d\u52a1\u5668\u5b58\u50a8\u8bbe\u5907\u7684\u6307\u5b9a\u4f4d\u7f6e\u3002API\u7aef\u53ef\u4ee5\u4f7f\u7528\u76f8\u5e94\u7684PHP\u51fd\u6570\uff0c\u5982file_get_contents()\uff0c\u6765\u83b7\u53d6POST\u8bf7\u6c42\u4e2d\u7684\u6570\u636e\uff0c\u5e76\u4f7f\u7528file_put_contents()\u51fd\u6570\u5c06\u6570\u636e\u4fdd\u5b58\u5230\u670d\u52a1\u5668\u4e0a\u7684\u6307\u5b9a\u8def\u5f84\u3002<\/p>\n<p><strong>3. \u662f\u5426\u9700\u8981\u5bf9\u4e0a\u4f20\u7684\u56fe\u7247\u8fdb\u884c\u5927\u5c0f\u3001\u683c\u5f0f\u7b49\u9a8c\u8bc1\uff1f<\/strong><br \/>\n\u662f\u7684\uff0c\u4e3a\u4e86\u786e\u4fdd\u56fe\u7247\u4e0a\u4f20\u7684\u5b89\u5168\u6027\u548c\u6b63\u786e\u6027\uff0c\u901a\u5e38\u9700\u8981\u5bf9\u4e0a\u4f20\u7684\u56fe\u7247\u8fdb\u884c\u4e00\u4e9b\u9a8c\u8bc1\u5904\u7406\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7\u68c0\u67e5\u4e0a\u4f20\u7684\u6587\u4ef6\u5927\u5c0f\u6765\u9650\u5236\u56fe\u7247\u7684\u6700\u5927\u5c3a\u5bf8\uff0c\u4ee5\u907f\u514d\u670d\u52a1\u5668\u8d44\u6e90\u88ab\u8017\u5c3d\u3002\u540c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528PHP\u7684\u5185\u7f6e\u51fd\u6570\u5982getimagesize()\uff0c\u6765\u9a8c\u8bc1\u4e0a\u4f20\u7684\u56fe\u7247\u662f\u5426\u7b26\u5408\u6307\u5b9a\u7684\u683c\u5f0f\u8981\u6c42\uff0c\u4f8b\u5982JPEG\u3001PNG\u7b49\u3002\u901a\u8fc7\u5bf9\u56fe\u7247\u8fdb\u884c\u4e00\u4e9b\u57fa\u672c\u7684\u9a8c\u8bc1\uff0c\u53ef\u4ee5\u63d0\u9ad8\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"APP\u4e0a\u4f20\u5934\u50cf\u65f6\uff0cPHP API\u7aef\u901a\u5e38\u901a\u8fc7$_FILES\u8d85\u5168\u5c40\u53d8\u91cf\u63a5\u6536\u4f20\u9012\u8fc7\u6765\u7684\u56fe\u7247\u6587\u4ef6\u4fe1\u606f\uff0c\u7ecf\u8fc7\u6821\u9a8c\u540e\u5b58\u50a8\u81f3 [&hellip;]","protected":false},"author":3,"featured_media":182294,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/182286"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=182286"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/182286\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/182294"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=182286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=182286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=182286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}