{"id":48906,"date":"2024-12-02T17:30:24","date_gmt":"2024-12-02T09:30:24","guid":{"rendered":"https:\/\/fwq.ai\/blog\/48906\/"},"modified":"2024-12-02T17:30:24","modified_gmt":"2024-12-02T09:30:24","slug":"php-%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e6%96%87%e7%ab%a0%e7%bc%96%e8%be%91%e9%a1%b5%e9%9d%a2%e8%b7%b3%e8%bd%ac%e5%9b%9e%e7%ae%a1%e7%90%86%e6%96%87%e7%ab%a0%e9%a1%b5%e9%9d%a2%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/48906\/","title":{"rendered":"PHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>PHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f<\/h1>\n<p>\u5927\u5bb6\u597d\uff0c\u4eca\u5929\u672c\u4eba\u7ed9\u5927\u5bb6\u5e26\u6765\u6587\u7ae0<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300aPHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f\u300b<\/span>\uff0c\u6587\u4e2d\u5185\u5bb9\u4e3b\u8981\u6d89\u53ca\u5230<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span><\/span>\uff0c\u5982\u679c\u4f60\u5bf9<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u6587\u7ae0<\/span>\u65b9\u9762\u7684\u77e5\u8bc6\u70b9\u611f\u5174\u8da3\uff0c\u90a3\u5c31\u8bf7\u5404\u4f4d\u670b\u53cb\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427~\u5e0c\u671b\u80fd\u771f\u6b63\u5e2e\u5230\u4f60\u4eec\uff0c\u8c22\u8c22\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241103\/17306042676726eceb3fa70.jpg\" class=\"aligncenter\" title=\"PHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f\u63d2\u56fe\" alt=\"PHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>php \u8df3\u8f6c\u5230\u4e0a\u4e00\u9875<\/strong><\/p>\n<p>\u95ee\u9898\u63cf\u8ff0\uff1a<\/p>\n<p>\u6709\u4f4d\u5f00\u53d1\u8005\u5728\u7f16\u8f91\u6587\u7ae0\u65f6\u60f3\u8981\u8df3\u56de\u5230\u7ba1\u7406\u6587\u7ae0\u9875\u9762\u3002\u4ed6\u4eec\u5e0c\u671b\u627e\u5230\u4e00\u4e2a php \u89e3\u51b3\u65b9\u6848\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6848\uff1a<\/p>\n<p>\u8981\u8fd4\u56de\u4e0a\u4e00\u9875\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>header(\"Location: \" . $_SERVER['HTTP_REFERER']);\nexit;<\/pre>\n<p><strong>\u8bf4\u660e\uff1a<\/strong><\/p>\n<ul>\n<li>$_server[&#8216;http_referer&#8217;] \u53d8\u91cf\u5305\u542b\u4e86\u4e0a\u4e00\u9875\u7684 url\u3002<\/li>\n<li>header(&#8220;location: &#8230;&#8221;) \u5c06\u53d1\u9001\u4e00\u4e2a\u91cd\u5b9a\u5411 http \u5934\uff0c\u544a\u8bc9\u6d4f\u89c8\u5668\u8df3\u8f6c\u5230\u6307\u5b9a\u7684 url\u3002<\/li>\n<li>exit; \u963b\u6b62 php \u811a\u672c\u8fdb\u4e00\u6b65\u6267\u884c\u3002<\/li>\n<\/ul>\n<p>\u5c06\u8fd9\u6bb5\u4ee3\u7801\u653e\u7f6e\u5728\u6587\u7ae0\u7f16\u8f91\u811a\u672c\u4e2d\u5b8c\u6210\u7f16\u8f91\u6216\u53d6\u6d88\u64cd\u4f5c\u540e\u5373\u53ef\u5b9e\u73b0\u8fd4\u56de\u4e0a\u4e00\u9875\u7684\u529f\u80fd\u3002<\/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\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f \u5927\u5bb6\u597d\uff0c\u4eca\u5929\u672c\u4eba\u7ed9\u5927\u5bb6\u5e26\u6765\u6587\u7ae0\u300aPHP \u5982\u4f55\u5b9e\u73b0\u6587\u7ae0\u7f16\u8f91\u9875\u9762\u8df3\u8f6c\u56de\u7ba1\u7406\u6587\u7ae0\u9875\u9762\uff1f\u300b\uff0c\u6587\u4e2d\u5185\u5bb9\u4e3b\u8981\u6d89\u53ca\u5230\uff0c\u5982\u679c\u4f60\u5bf9\u6587\u7ae0\u65b9\u9762\u7684\u77e5\u8bc6\u70b9\u611f\u5174\u8da3\uff0c\u90a3\u5c31\u8bf7\u5404\u4f4d\u670b\u53cb\u7ee7\u7eed\u770b\u4e0b\u53bb\u5427~\u5e0c\u671b\u80fd\u771f\u6b63\u5e2e\u5230\u4f60\u4eec\uff0c\u8c22\u8c22\uff01 php \u8df3\u8f6c\u5230\u4e0a\u4e00\u9875 \u95ee\u9898\u63cf\u8ff0\uff1a \u6709\u4f4d\u5f00\u53d1\u8005\u5728\u7f16\u8f91\u6587\u7ae0\u65f6\u60f3\u8981\u8df3\u56de\u5230\u7ba1\u7406\u6587\u7ae0\u9875\u9762\u3002\u4ed6\u4eec\u5e0c\u671b\u627e\u5230\u4e00\u4e2a php \u89e3\u51b3\u65b9\u6848\u6765\u5b9e\u73b0\u8fd9\u4e2a\u529f\u80fd\u3002 \u89e3\u51b3\u65b9\u6848\uff1a \u8981\u8fd4\u56de\u4e0a\u4e00\u9875\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a header(&#8220;Location: &#8221; . $_SERVER[&#8216;HTTP_REFERER&#8217;]); exit; \u8bf4\u660e\uff1a $_server[&#8216;http_referer&#8217;] \u53d8\u91cf\u5305\u542b\u4e86\u4e0a\u4e00\u9875\u7684 url\u3002 header(&#8220;location: &#8230;&#8221;) \u5c06\u53d1\u9001\u4e00\u4e2a\u91cd\u5b9a\u5411 http \u5934\uff0c\u544a\u8bc9\u6d4f\u89c8\u5668\u8df3\u8f6c\u5230\u6307\u5b9a\u7684 url\u3002 exit; \u963b\u6b62 php \u811a\u672c\u8fdb\u4e00\u6b65\u6267\u884c\u3002 \u5c06\u8fd9\u6bb5\u4ee3\u7801\u653e\u7f6e\u5728\u6587\u7ae0\u7f16\u8f91\u811a\u672c\u4e2d\u5b8c\u6210\u7f16\u8f91\u6216\u53d6\u6d88\u64cd\u4f5c\u540e\u5373\u53ef\u5b9e\u73b0\u8fd4\u56de\u4e0a\u4e00\u9875\u7684\u529f\u80fd\u3002 \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\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u4e00\u8d77\u5b66\u4e60\u7f16\u7a0b~<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-48906","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/48906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=48906"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/48906\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=48906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=48906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=48906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}