{"id":61299,"date":"2026-01-17T11:33:24","date_gmt":"2026-01-17T03:33:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/61299.html"},"modified":"2026-01-17T11:33:24","modified_gmt":"2026-01-17T03:33:24","slug":"php%e6%8e%a5%e5%8f%a3%e8%af%b7%e6%b1%82%e8%b6%85%e6%97%b6%e5%ae%8c%e6%95%b4%e6%8e%92%e6%9f%a5%e4%b8%8e%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88%ef%bc%88%e4%bb%8e%e4%bb%a3%e7%a0%81%e5%88%b0%e6%9c%8d","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/61299.html","title":{"rendered":"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09"},"content":{"rendered":"<p>\u63a5\u53e3\u4e0d\u662f\u62a5\u9519&#xff0c;<br \/>\n\u800c\u662f\u2014\u2014\u4e00\u76f4\u7b49&#xff0c;\u6700\u540e\u76f4\u63a5 timeout\u3002<\/p>\n<p>\u5f88\u591a PHP \u5f00\u53d1\u8005\u90fd\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5&#xff1a;<\/p>\n<ul>\n<li>\u672c\u5730\u8bf7\u6c42 OK&#xff0c;\u4e0a\u7ebf\u5c31\u8d85\u65f6<\/li>\n<li>curl \u6ca1\u62a5\u9519&#xff0c;\u4f46\u8fd4\u56de false<\/li>\n<li>\u9875\u9762\u8f6c\u5708&#xff0c;\u6700\u540e 504 \/ timeout<\/li>\n<li>\u7b2c\u4e09\u65b9\u63a5\u53e3\u5076\u5c14\u6210\u529f&#xff0c;\u5076\u5c14\u8d85\u65f6<\/li>\n<\/ul>\n<p>\u8d85\u65f6\u95ee\u9898\u6700\u96be\u7684\u5730\u65b9\u5728\u4e8e&#xff1a;<br \/>\n&#x1f449; \u4f60\u4e0d\u77e5\u9053\u662f \u4ee3\u7801\u6162\u3001\u63a5\u53e3\u6162\u3001\u7f51\u7edc\u6162&#xff0c;\u8fd8\u662f\u670d\u52a1\u5668\u5728\u62e6\u4f60<\/p>\n<p>\u8fd9\u7bc7\u6587\u7ae0&#xff0c;\u6211\u76f4\u63a5\u7ed9\u4f60\u4e00\u5957 \u4ece PHP \u5230\u670d\u52a1\u5668\u7684\u5b8c\u6574\u6392\u67e5\u987a\u5e8f\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001\u5148\u786e\u8ba4&#xff1a;\u662f\u54ea\u4e00\u5c42\u5728\u201c\u8d85\u65f6\u201d&#xff1f;<\/h3>\n<p>\u8d85\u65f6\u5e76\u4e0d\u53ea\u6709\u4e00\u79cd&#xff0c;\u4e0d\u540c\u5c42\u7684\u8d85\u65f6&#xff0c;\u89e3\u51b3\u65b9\u5f0f\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<p>\u5e38\u89c1\u7684 4 \u79cd\u8d85\u65f6\u6765\u6e90&#x1f447;<\/p>\n<table>\n<tr>\u5c42\u7ea7\u5e38\u89c1\u73b0\u8c61<\/tr>\n<tbody>\n<tr>\n<td>PHP cURL<\/td>\n<td>curl_exec() \u8fd4\u56de false<\/td>\n<\/tr>\n<tr>\n<td>PHP \u811a\u672c<\/td>\n<td>\u9875\u9762\u6267\u884c\u5230\u4e00\u534a\u7ec8\u6b62<\/td>\n<\/tr>\n<tr>\n<td>Web \u670d\u52a1\u5668<\/td>\n<td>504 Gateway Timeout<\/td>\n<\/tr>\n<tr>\n<td>\u4e0a\u6e38\u63a5\u53e3<\/td>\n<td>\u5076\u5c14\u6210\u529f&#xff0c;\u5076\u5c14\u8d85\u65f6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f449; \u7b2c\u4e00\u6b65\u6c38\u8fdc\u662f\u5b9a\u4f4d\u5c42\u7ea7<\/p>\n<hr \/>\n<h3>\u4e8c\u3001PHP cURL \u5c42&#xff1a;\u6700\u5e38\u89c1\u7684\u8d85\u65f6\u539f\u56e0<\/h3>\n<h4>1\ufe0f\u20e3 CURLOPT_TIMEOUT \u8bbe\u7f6e\u8fc7\u5c0f<\/h4>\n<p>\u5f88\u591a\u4eba\u56fe\u5feb&#xff0c;\u5199\u6210\u8fd9\u6837&#xff1a;<\/p>\n<p>curl_setopt($ch, CURLOPT_TIMEOUT, 2);<\/p>\n<p>\u7b2c\u4e09\u65b9\u63a5\u53e3\u7a0d\u5fae\u6162\u4e00\u70b9&#xff1a;<\/p>\n<p>&#x1f449; \u76f4\u63a5\u8d85\u65f6<\/p>\n<p>\u2705 \u5efa\u8bae&#xff1a;<\/p>\n<p>curl_setopt($ch, CURLOPT_TIMEOUT, 10);<br \/>\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);<\/p>\n<hr \/>\n<h4>2\ufe0f\u20e3 \u53ea\u8bbe\u4e86 TIMEOUT&#xff0c;\u6ca1\u8bbe CONNECTTIMEOUT<\/h4>\n<ul>\n<li>CONNECTTIMEOUT&#xff1a;\u8fde\u63a5\u9636\u6bb5<\/li>\n<li>TIMEOUT&#xff1a;\u6574\u4f53\u8bf7\u6c42<\/li>\n<\/ul>\n<p>\u6ca1\u8bbe\u8fde\u63a5\u8d85\u65f6&#xff0c;DNS \/ TCP \u5361\u4f4f\u4f1a\u4e00\u76f4\u7b49<\/p>\n<hr \/>\n<h4>3\ufe0f\u20e3 DNS \u89e3\u6790\u6162&#xff08;\u975e\u5e38\u9690\u853d&#xff09;<\/h4>\n<p>\u8868\u73b0\u4e3a&#xff1a;<\/p>\n<ul>\n<li>IP \u76f4\u8fde\u5feb<\/li>\n<li>\u57df\u540d\u8bbf\u95ee\u6162<\/li>\n<\/ul>\n<p>&#x1f449; \u6392\u67e5\u65b9\u6cd5&#xff1a;<\/p>\n<p>ping api.example.com<\/p>\n<p>\u6216\u4e34\u65f6\u7528 IP \u6d4b\u8bd5\u3002<\/p>\n<hr \/>\n<h4>4\ufe0f\u20e3 SSL \u63e1\u624b\u8017\u65f6\u8fc7\u957f<\/h4>\n<p>HTTPS \u63a5\u53e3\u5728\u4ee5\u4e0b\u60c5\u51b5\u5bb9\u6613\u6162&#xff1a;<\/p>\n<ul>\n<li>\u8001\u7cfb\u7edf<\/li>\n<li>\u8bc1\u4e66\u94fe\u8fc7\u957f<\/li>\n<li>\u6ca1\u5f00\u542f keep-alive<\/li>\n<\/ul>\n<p>&#x1f449; \u8868\u73b0\u4e3a \u7b2c\u4e00\u6b21\u8bf7\u6c42\u7279\u522b\u6162<\/p>\n<hr \/>\n<h3>\u4e09\u3001PHP \u811a\u672c\u672c\u8eab\u88ab\u201c\u6390\u6b7b\u201d<\/h3>\n<h4>5\ufe0f\u20e3 max_execution_time \u4e0d\u591f<\/h4>\n<p>max_execution_time &#061; 30<\/p>\n<p>\u63a5\u53e3 &#043; \u5904\u7406\u903b\u8f91\u8d85\u8fc7\u65f6\u95f4&#xff1a;<\/p>\n<p>&#x1f449; PHP \u76f4\u63a5\u7ec8\u6b62<\/p>\n<p>\u2705 \u4e34\u65f6\u6d4b\u8bd5&#xff1a;<\/p>\n<p>set_time_limit(0);<\/p>\n<hr \/>\n<h4>6\ufe0f\u20e3 memory_limit \u5bfc\u81f4\u5047\u6027\u8d85\u65f6<\/h4>\n<p>\u5185\u5b58\u4e0d\u8db3\u65f6&#xff1a;<\/p>\n<ul>\n<li>\u811a\u672c\u5361\u4f4f<\/li>\n<li>\u6ca1\u660e\u786e\u62a5\u9519<\/li>\n<li>\u6700\u7ec8\u8868\u73b0\u4e3a\u8d85\u65f6<\/li>\n<\/ul>\n<p>&#x1f449; \u65e5\u5fd7\u91cc\u901a\u5e38\u6709\u7ebf\u7d22<\/p>\n<hr \/>\n<h3>\u56db\u3001Web \u670d\u52a1\u5668\u5c42\u7684\u8d85\u65f6&#xff08;\u6700\u5bb9\u6613\u88ab\u8bef\u5224&#xff09;<\/h3>\n<h4>7\ufe0f\u20e3 Nginx fastcgi_read_timeout<\/h4>\n<p>fastcgi_read_timeout 60;<\/p>\n<p>PHP-FPM \u6162\u4e00\u70b9&#xff1a;<\/p>\n<p>&#x1f449; Nginx \u76f4\u63a5 504<\/p>\n<hr \/>\n<h4>8\ufe0f\u20e3 PHP-FPM \u8fdb\u7a0b\u88ab\u8017\u5c3d<\/h4>\n<p>\u8868\u73b0&#xff1a;<\/p>\n<ul>\n<li>\u5076\u53d1\u8d85\u65f6<\/li>\n<li>\u9ad8\u5e76\u53d1\u65f6\u5fc5\u73b0<\/li>\n<\/ul>\n<p>\u539f\u56e0&#xff1a;<\/p>\n<ul>\n<li>pm.max_children \u592a\u5c0f<\/li>\n<li>\u6162\u8bf7\u6c42\u5806\u79ef<\/li>\n<\/ul>\n<p>&#x1f449; \u4e0d\u662f\u4ee3\u7801\u95ee\u9898&#xff0c;\u662f\u914d\u7f6e\u95ee\u9898<\/p>\n<hr \/>\n<h3>\u4e94\u3001\u7b2c\u4e09\u65b9\u63a5\u53e3\u81ea\u8eab\u95ee\u9898&#xff08;\u4f46\u4f60\u8981\u515c\u5e95&#xff09;<\/h3>\n<h4>9\ufe0f\u20e3 \u63a5\u53e3\u9650\u6d41 \/ \u98ce\u63a7\u5bfc\u81f4\u201c\u5047\u8d85\u65f6\u201d<\/h4>\n<p>\u5f88\u591a\u7b2c\u4e09\u65b9 API&#xff1a;<\/p>\n<ul>\n<li>\u8d85\u9650\u4e0d\u8fd4\u56de\u9519\u8bef<\/li>\n<li>\u76f4\u63a5\u62d6\u5230\u8d85\u65f6<\/li>\n<\/ul>\n<p>&#x1f449; \u6781\u5176\u5e38\u89c1<\/p>\n<hr \/>\n<h4>&#x1f51f; \u63a5\u53e3\u9ad8\u5cf0\u671f\u54cd\u5e94\u53d8\u6162<\/h4>\n<p>\u8868\u73b0\u4e3a&#xff1a;<\/p>\n<ul>\n<li>\u767d\u5929\u6162<\/li>\n<li>\u665a\u4e0a\u5feb<\/li>\n<\/ul>\n<p>&#x1f449; \u52a0\u91cd\u8bd5 \/ \u964d\u7ea7\u662f\u552f\u4e00\u89e3\u6cd5<\/p>\n<hr \/>\n<h3>\u516d\u3001\u7f51\u7edc\u4e0e\u670d\u52a1\u5668\u73af\u5883\u95ee\u9898&#xff08;\u7ebf\u4e0a\u5e38\u89c1&#xff09;<\/h3>\n<h4>1\ufe0f\u20e31\ufe0f\u20e3 \u9632\u706b\u5899 \/ \u5b89\u5168\u7ec4\u62e6\u622a<\/h4>\n<p>\u4e91\u670d\u52a1\u5668\u5e38\u89c1&#xff1a;<\/p>\n<ul>\n<li>\u65b0\u7aef\u53e3\u88ab\u62e6<\/li>\n<li>\u51fa\u53e3\u6d41\u91cf\u88ab\u9650\u5236<\/li>\n<\/ul>\n<p>&#x1f449; \u672c\u5730 OK&#xff0c;\u670d\u52a1\u5668\u8d85\u65f6<\/p>\n<hr \/>\n<h4>1\ufe0f\u20e32\ufe0f\u20e3 PHP-FPM \u4e0e Nginx \u901a\u4fe1\u5f02\u5e38<\/h4>\n<p>Unix Socket \/ TCP \u914d\u7f6e\u4e0d\u5f53&#xff1a;<\/p>\n<ul>\n<li>\u8bf7\u6c42\u6302\u8d77<\/li>\n<li>\u65e0\u660e\u663e\u9519\u8bef<\/li>\n<\/ul>\n<p>&#x1f449; \u770b Nginx &#043; PHP-FPM \u65e5\u5fd7<\/p>\n<hr \/>\n<h3>\u4e03\u3001\u6807\u51c6\u6392\u67e5\u987a\u5e8f&#xff08;\u975e\u5e38\u91cd\u8981&#xff09;<\/h3>\n<p>\u5f53\u4f60\u9047\u5230 PHP \u63a5\u53e3\u8d85\u65f6\u65f6&#xff0c;\u6309\u8fd9\u4e2a\u987a\u5e8f\u8d70&#xff1a;<\/p>\n<p>1\ufe0f\u20e3 \u6253\u5370 curl_error &#043; curl_getinfo<br \/>\n2\ufe0f\u20e3 \u4e34\u65f6\u653e\u5927 cURL timeout<br \/>\n3\ufe0f\u20e3 \u5355\u72ec\u6d4b\u8bd5\u7b2c\u4e09\u65b9\u63a5\u53e3<br \/>\n4\ufe0f\u20e3 \u67e5\u770b PHP \u9519\u8bef\u65e5\u5fd7<br \/>\n5\ufe0f\u20e3 \u67e5\u770b Nginx \/ Apache \u65e5\u5fd7<br \/>\n6\ufe0f\u20e3 \u68c0\u67e5 PHP-FPM \u72b6\u6001<\/p>\n<p>&#x1f449; \u4e0d\u8981\u4e00\u4e0a\u6765\u5c31\u6539\u670d\u52a1\u5668<\/p>\n<hr \/>\n<h3>\u516b\u3001\u4e00\u4e2a\u201c\u8d85\u65f6\u8c03\u8bd5\u6a21\u677f\u201d&#xff08;\u5f3a\u70c8\u5efa\u8bae\u4f60\u7528&#xff09;<\/h3>\n<p>curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);<br \/>\ncurl_setopt($ch, CURLOPT_TIMEOUT, 15);<br \/>\ncurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);<\/p>\n<p>$res &#061; curl_exec($ch);<\/p>\n<p>if ($res &#061;&#061;&#061; false) {<br \/>\n    echo curl_error($ch);<br \/>\n    var_dump(curl_getinfo($ch));<br \/>\n    exit;<br \/>\n}<\/p>\n<p>&#x1f449; \u81f3\u5c11\u8ba9\u4f60\u77e5\u9053 \u5361\u5728\u4e86\u54ea\u4e00\u6b65<\/p>\n<hr \/>\n<h3>\u4e5d\u3001\u5de5\u7a0b\u7ea7\u89e3\u51b3\u65b9\u6848&#xff08;\u8001\u9879\u76ee\u5fc5\u7528&#xff09;<\/h3>\n<h4>\u2705 \u8d85\u65f6\u515c\u5e95\u65b9\u6848<\/h4>\n<ul>\n<li>\u8bbe\u7f6e\u5408\u7406\u8d85\u65f6<\/li>\n<li>\u63a5\u53e3\u5931\u8d25\u8d70\u964d\u7ea7<\/li>\n<li>\u4e0d\u963b\u585e\u4e3b\u6d41\u7a0b<\/li>\n<\/ul>\n<h4>\u2705 \u4e2d\u8f6c\u670d\u52a1\u89e3\u8026<\/h4>\n<p>\u524d\u7aef \u2192 \u81ea\u5df1\u63a5\u53e3 \u2192 \u961f\u5217 \/ \u5f02\u6b65 \u2192 \u7b2c\u4e09\u65b9 API<\/p>\n<p>&#x1f449; \u522b\u8ba9\u7b2c\u4e09\u65b9\u63a5\u53e3\u62d6\u6b7b\u4f60\u81ea\u5df1<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a5\u53e3\u4e0d\u662f\u62a5\u9519&#xff0c;<br \/>\n\u800c\u662f\u2014\u2014\u4e00\u76f4\u7b49&#xff0c;\u6700\u540e\u76f4\u63a5 timeout\u3002\u5f88\u591a PHP \u5f00\u53d1\u8005\u90fd\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5&#xff1a;<br \/>\n\u672c\u5730\u8bf7\u6c42 OK&#xff0c;\u4e0a\u7ebf\u5c31\u8d85\u65f6curl \u6ca1\u62a5\u9519&#xff0c;\u4f46\u8fd4\u56de false\u9875\u9762\u8f6c\u5708&#xff0c;\u6700\u540e 504 \/ timeout\u7b2c\u4e09\u65b9\u63a5\u53e3\u5076\u5c14\u6210\u529f&#xff0c;\u5076\u5c14\u8d85\u65f6<br \/>\n\u8d85\u65f6\u95ee\u9898\u6700\u96be\u7684\u5730\u65b9\u5728\u4e8e&#xff1a;<br \/>\n&#x1f449; \u4f60\u4e0d\u77e5\u9053\u662f \u4ee3\u7801\u6162\u3001\u63a5\u53e3\u6162\u3001\u7f51\u7edc\u6162&#xff0c;\u8fd8\u662f\u670d\u52a1\u5668\u5728\u62e6\u4f60<br \/>\n\u8fd9\u7bc7\u6587\u7ae0&amp;#xff0c<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[230,190,43],"topic":[],"class_list":["post-61299","post","type-post","status-publish","format-standard","hentry","category-server","tag-php","tag-190","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/61299.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u63a5\u53e3\u4e0d\u662f\u62a5\u9519&#xff0c; \u800c\u662f\u2014\u2014\u4e00\u76f4\u7b49&#xff0c;\u6700\u540e\u76f4\u63a5 timeout\u3002\u5f88\u591a PHP \u5f00\u53d1\u8005\u90fd\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5&#xff1a; \u672c\u5730\u8bf7\u6c42 OK&#xff0c;\u4e0a\u7ebf\u5c31\u8d85\u65f6curl \u6ca1\u62a5\u9519&#xff0c;\u4f46\u8fd4\u56de false\u9875\u9762\u8f6c\u5708&#xff0c;\u6700\u540e 504 \/ timeout\u7b2c\u4e09\u65b9\u63a5\u53e3\u5076\u5c14\u6210\u529f&#xff0c;\u5076\u5c14\u8d85\u65f6 \u8d85\u65f6\u95ee\u9898\u6700\u96be\u7684\u5730\u65b9\u5728\u4e8e&#xff1a; &#x1f449; \u4f60\u4e0d\u77e5\u9053\u662f \u4ee3\u7801\u6162\u3001\u63a5\u53e3\u6162\u3001\u7f51\u7edc\u6162&#xff0c;\u8fd8\u662f\u670d\u52a1\u5668\u5728\u62e6\u4f60 \u8fd9\u7bc7\u6587\u7ae0&amp;#xff0c\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/61299.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-17T03:33:24+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61299.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/61299.html\",\"name\":\"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-17T03:33:24+00:00\",\"dateModified\":\"2026-01-17T03:33:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/61299.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/61299.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/61299.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/61299.html","og_locale":"zh_CN","og_type":"article","og_title":"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u63a5\u53e3\u4e0d\u662f\u62a5\u9519&#xff0c; \u800c\u662f\u2014\u2014\u4e00\u76f4\u7b49&#xff0c;\u6700\u540e\u76f4\u63a5 timeout\u3002\u5f88\u591a PHP \u5f00\u53d1\u8005\u90fd\u4f1a\u9047\u5230\u8fd9\u79cd\u60c5\u51b5&#xff1a; \u672c\u5730\u8bf7\u6c42 OK&#xff0c;\u4e0a\u7ebf\u5c31\u8d85\u65f6curl \u6ca1\u62a5\u9519&#xff0c;\u4f46\u8fd4\u56de false\u9875\u9762\u8f6c\u5708&#xff0c;\u6700\u540e 504 \/ timeout\u7b2c\u4e09\u65b9\u63a5\u53e3\u5076\u5c14\u6210\u529f&#xff0c;\u5076\u5c14\u8d85\u65f6 \u8d85\u65f6\u95ee\u9898\u6700\u96be\u7684\u5730\u65b9\u5728\u4e8e&#xff1a; &#x1f449; \u4f60\u4e0d\u77e5\u9053\u662f \u4ee3\u7801\u6162\u3001\u63a5\u53e3\u6162\u3001\u7f51\u7edc\u6162&#xff0c;\u8fd8\u662f\u670d\u52a1\u5668\u5728\u62e6\u4f60 \u8fd9\u7bc7\u6587\u7ae0&amp;#xff0c","og_url":"https:\/\/www.wsisp.com\/helps\/61299.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-17T03:33:24+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/61299.html","url":"https:\/\/www.wsisp.com\/helps\/61299.html","name":"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-17T03:33:24+00:00","dateModified":"2026-01-17T03:33:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/61299.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/61299.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/61299.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"PHP\u63a5\u53e3\u8bf7\u6c42\u8d85\u65f6\u5b8c\u6574\u6392\u67e5\u4e0e\u89e3\u51b3\u65b9\u6848\uff08\u4ece\u4ee3\u7801\u5230\u670d\u52a1\u5668\uff09"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=61299"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/61299\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=61299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=61299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=61299"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=61299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}