{"id":14918,"date":"2025-04-18T21:37:04","date_gmt":"2025-04-18T13:37:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/14918.html"},"modified":"2025-04-18T21:37:04","modified_gmt":"2025-04-18T13:37:04","slug":"%e5%88%b0%e5%ba%95%e4%b8%ba%e4%bb%80%e4%b9%88%e6%b5%8f%e8%a7%88%e5%99%a8%e4%bc%9a%e5%9c%a8%e6%af%8f%e6%ac%a1%e8%af%b7%e6%b1%82%e6%97%b6%e8%87%aa%e5%8a%a8%e5%b0%86-cookie-%e5%8f%91%e9%80%81%e5%88%b0","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/14918.html","title":{"rendered":"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f"},"content":{"rendered":"<p>\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668&#xff0c;\u8fd9\u662f\u7531 HTTP \u534f\u8bae \u548c Cookie \u7684\u5de5\u4f5c\u673a\u5236 \u51b3\u5b9a\u7684\u3002<\/p>\n<hr \/>\n<h4>1. \u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u53d1\u9001 Cookie&#xff1f;<\/h4>\n<h5>&#xff08;1&#xff09;HTTP \u534f\u8bae\u7684\u8bbe\u8ba1<\/h5>\n<ul>\n<li>HTTP \u662f\u4e00\u79cd\u65e0\u72b6\u6001\u534f\u8bae&#xff0c;\u8fd9\u610f\u5473\u7740\u670d\u52a1\u5668\u65e0\u6cd5\u8bb0\u4f4f\u7528\u6237\u7684\u8bf7\u6c42\u3002<\/li>\n<li>\u4e3a\u4e86\u8ba9\u670d\u52a1\u5668\u80fd\u591f\u8bc6\u522b\u7528\u6237\u5e76\u4fdd\u6301\u72b6\u6001&#xff0c;\u5f15\u5165\u4e86 Cookie \u673a\u5236\u3002<\/li>\n<li>\u5f53\u670d\u52a1\u5668\u8bbe\u7f6e\u4e86\u4e00\u4e2a Cookie \u540e&#xff0c;\u6d4f\u89c8\u5668\u4f1a\u6309\u7167 HTTP \u534f\u8bae\u7684\u89c4\u5219&#xff0c;\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d\u81ea\u52a8\u5c06\u8be5 Cookie \u53d1\u9001\u56de\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<h5>&#xff08;2&#xff09;Cookie \u7684\u5de5\u4f5c\u673a\u5236<\/h5>\n<ul>\n<li>\u670d\u52a1\u5668\u8bbe\u7f6e Cookie&#xff1a;\n<ul>\n<li>\u670d\u52a1\u5668\u901a\u8fc7 HTTP \u54cd\u5e94\u5934\u4e2d\u7684 Set-Cookie \u5b57\u6bb5\u5411\u6d4f\u89c8\u5668\u53d1\u9001\u4e00\u4e2a Cookie\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;HTTP\/1.1 200 OK<br \/>\nSet-Cookie: PHPSESSID&#061;abc123; path&#061;\/; HttpOnly\n <\/li>\n<\/ul>\n<\/li>\n<li>\u6d4f\u89c8\u5668\u5b58\u50a8 Cookie&#xff1a;\n<ul>\n<li>\u6d4f\u89c8\u5668\u4f1a\u6839\u636e Set-Cookie \u7684\u5185\u5bb9&#xff0c;\u5c06 Cookie \u5b58\u50a8\u5728\u672c\u5730\u3002<\/li>\n<li>Cookie \u7684\u5c5e\u6027&#xff08;\u5982\u57df\u540d\u3001\u8def\u5f84\u3001\u6709\u6548\u671f\u7b49&#xff09;\u51b3\u5b9a\u4e86\u5b83\u5728\u54ea\u4e9b\u8bf7\u6c42\u4e2d\u4f1a\u88ab\u53d1\u9001\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6d4f\u89c8\u5668\u53d1\u9001 Cookie&#xff1a;\n<ul>\n<li>\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d&#xff0c;\u6d4f\u89c8\u5668\u4f1a\u6839\u636e\u8bf7\u6c42\u7684 URL \u548c Cookie \u7684\u5c5e\u6027&#xff0c;\u81ea\u52a8\u5c06\u5339\u914d\u7684 Cookie \u6dfb\u52a0\u5230 HTTP \u8bf7\u6c42\u5934\u4e2d\u7684 Cookie \u5b57\u6bb5\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;GET \/page.php HTTP\/1.1<br \/>\nHost: example.com<br \/>\nCookie: PHPSESSID&#061;abc123\n <\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>&#xff08;3&#xff09;\u901a\u4fd7\u89e3\u91ca<\/h5>\n<ul>\n<li>\u60f3\u8c61\u4f60\u53bb\u4e00\u5bb6\u5496\u5561\u5e97&#xff0c;\u5e97\u5458\u7ed9\u4f60\u4e00\u5f20\u4f1a\u5458\u5361&#xff08;Cookie&#xff09;&#xff0c;\u5e76\u544a\u8bc9\u4f60\u6bcf\u6b21\u6765\u7684\u65f6\u5019\u5e26\u4e0a\u8fd9\u5f20\u5361\u3002<\/li>\n<li>\u4e0b\u6b21\u4f60\u518d\u53bb\u8fd9\u5bb6\u5496\u5561\u5e97\u65f6&#xff0c;\u4f60\u4f1a\u81ea\u52a8\u5e26\u4e0a\u4f1a\u5458\u5361&#xff08;\u6d4f\u89c8\u5668\u53d1\u9001 Cookie&#xff09;\u3002<\/li>\n<li>\u5e97\u5458\u770b\u5230\u4f1a\u5458\u5361\u540e&#xff0c;\u5c31\u77e5\u9053\u4f60\u662f\u8c01&#xff0c;\u5e76\u63d0\u4f9b\u76f8\u5e94\u7684\u670d\u52a1\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>2. PHP \u5e95\u5c42\u5230\u5e95\u505a\u4e86\u4ec0\u4e48\u4e8b\u60c5&#xff1f;<\/h4>\n<h5>&#xff08;1&#xff09;\u8bbe\u7f6e Cookie<\/h5>\n<ul>\n<li>\u5f53\u8c03\u7528 session_start() \u65f6&#xff0c;PHP \u4f1a\u81ea\u52a8\u8bbe\u7f6e\u4e00\u4e2a\u540d\u4e3a PHPSESSID \u7684 Cookie&#xff0c;\u7528\u4e8e\u5b58\u50a8\u4f1a\u8bdd ID\u3002<\/li>\n<li>\u5982\u679c\u9700\u8981\u624b\u52a8\u8bbe\u7f6e\u5176\u4ed6 Cookie&#xff0c;\u53ef\u4ee5\u4f7f\u7528 setcookie() \u51fd\u6570\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;<span class=\"token function\">setcookie<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;username&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;Alice&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">time<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">3600<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>\n<ul>\n<li>\u53c2\u6570\u8bf4\u660e&#xff1a;\n<ul>\n<li>&#039;username&#039;&#xff1a;Cookie \u540d\u79f0\u3002<\/li>\n<li>&#039;Alice&#039;&#xff1a;Cookie \u503c\u3002<\/li>\n<li>time() &#043; 3600&#xff1a;\u6709\u6548\u671f\u4e3a 1 \u5c0f\u65f6\u3002<\/li>\n<li>&#039;\/&#039;&#xff1a;\u4f5c\u7528\u8def\u5f84\u4e3a\u6574\u4e2a\u57df\u540d\u3002<\/li>\n<li>&#039;&#039;&#xff1a;\u57df\u540d\u4e3a\u7a7a&#xff0c;\u8868\u793a\u5f53\u524d\u57df\u540d\u3002<\/li>\n<li>true&#xff1a;\u4ec5\u901a\u8fc7 HTTPS \u4f20\u8f93&#xff08;Secure \u6807\u5fd7&#xff09;\u3002<\/li>\n<li>true&#xff1a;\u7981\u6b62 JavaScript \u8bbf\u95ee&#xff08;HttpOnly \u6807\u5fd7&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>&#xff08;2&#xff09;\u8bfb\u53d6 Cookie<\/h5>\n<ul>\n<li>PHP \u4f1a\u81ea\u52a8\u89e3\u6790 HTTP \u8bf7\u6c42\u5934\u4e2d\u7684 Cookie \u5b57\u6bb5&#xff0c;\u5e76\u5c06\u5176\u5b58\u50a8\u5728 $_COOKIE \u8d85\u5168\u5c40\u6570\u7ec4\u4e2d\u3002<\/li>\n<li>\u793a\u4f8b&#xff1a;<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">isset<\/span><span class=\"token punctuation\">(<\/span><span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string single-quoted-string\">&#039;PHPSESSID&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u4f1a\u8bdd ID&#xff1a;&#034;<\/span> <span class=\"token operator\">.<\/span> <span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string single-quoted-string\">&#039;PHPSESSID&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span>\n <\/li>\n<\/ul>\n<h5>&#xff08;3&#xff09;\u7ba1\u7406\u4f1a\u8bdd<\/h5>\n<ul>\n<li>\u5f53\u6d4f\u89c8\u5668\u53d1\u9001 PHPSESSID Cookie \u65f6&#xff0c;PHP \u4f1a\u6839\u636e\u5176\u503c\u627e\u5230\u5bf9\u5e94\u7684\u4f1a\u8bdd\u6570\u636e\u3002<\/li>\n<li>\u5982\u679c\u6ca1\u6709\u627e\u5230\u6709\u6548\u7684\u4f1a\u8bdd ID&#xff0c;PHP \u4f1a\u751f\u6210\u4e00\u4e2a\u65b0\u7684\u4f1a\u8bdd ID&#xff0c;\u5e76\u8bbe\u7f6e\u65b0\u7684 PHPSESSID Cookie\u3002<\/li>\n<\/ul>\n<hr \/>\n<h4>3. \u5b8c\u6574\u4ee3\u7801\u793a\u4f8b &#043; \u8be6\u7ec6\u6ce8\u91ca<\/h4>\n<p>\u4ee5\u4e0b\u662f\u4e00\u4e2a\u5b8c\u6574\u7684 PHP \u793a\u4f8b&#xff0c;\u5c55\u793a\u5982\u4f55\u8bbe\u7f6e\u548c\u8bfb\u53d6 Cookie&#xff0c;\u4ee5\u53ca\u5982\u4f55\u4f7f\u7528 Cookie \u7ba1\u7406\u4f1a\u8bdd\u3002<\/p>\n<p><span class=\"token delimiter important\">&lt;?php<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u542f\u52a8\u4f1a\u8bdd<\/span><br \/>\n<span class=\"token function\">session_start<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> <span class=\"token comment\">\/\/ \u5f00\u59cb\u4e00\u4e2a\u65b0\u7684\u4f1a\u8bdd&#xff0c;\u6216\u8005\u6062\u590d\u73b0\u6709\u7684\u4f1a\u8bdd<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u8f93\u51fa\u5f53\u524d\u4f1a\u8bdd ID<\/span><br \/>\n<span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5f53\u524d\u4f1a\u8bdd ID&#xff1a;&#034;<\/span> <span class=\"token operator\">.<\/span> <span class=\"token function\">session_id<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">.<\/span> <span class=\"token string double-quoted-string\">&#034;\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u68c0\u67e5\u662f\u5426\u901a\u8fc7 Cookie \u4f20\u9012\u4f1a\u8bdd ID<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">isset<\/span><span class=\"token punctuation\">(<\/span><span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string single-quoted-string\">&#039;PHPSESSID&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u4f1a\u8bdd ID \u901a\u8fc7 Cookie \u4f20\u9012\u3002\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u4f1a\u8bdd ID \u672a\u901a\u8fc7 Cookie \u4f20\u9012\u3002\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u624b\u52a8\u8bbe\u7f6e\u4e00\u4e2a\u81ea\u5b9a\u4e49 Cookie<\/span><br \/>\n<span class=\"token function\">setcookie<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;username&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;Alice&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">time<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">3600<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5df2\u8bbe\u7f6e Cookie&#xff1a;username&#061;Alice\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u67e5\u770b\u5f53\u524d\u7684 Cookie<\/span><br \/>\n<span class=\"token function\">print_r<\/span><span class=\"token punctuation\">(<\/span><span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5220\u9664\u81ea\u5b9a\u4e49 Cookie<\/span><br \/>\n<span class=\"token function\">setcookie<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;username&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">time<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">3600<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5df2\u5220\u9664 Cookie&#xff1a;username\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h4>4. \u6bcf\u4e00\u884c\u4ee3\u7801\u7684\u8be6\u7ec6\u6ce8\u91ca<\/h4>\n<p><span class=\"token delimiter important\">&lt;?php<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u542f\u52a8\u4f1a\u8bdd<\/span><br \/>\n<span class=\"token function\">session_start<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u8fd9\u884c\u4ee3\u7801\u544a\u8bc9 PHP \u5f00\u59cb\u4e00\u4e2a\u65b0\u7684\u4f1a\u8bdd&#xff0c;\u6216\u8005\u6062\u590d\u4e4b\u524d\u4fdd\u5b58\u7684\u4f1a\u8bdd\u3002<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u8f93\u51fa\u5f53\u524d\u4f1a\u8bdd ID<\/span><br \/>\n<span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5f53\u524d\u4f1a\u8bdd ID&#xff1a;&#034;<\/span> <span class=\"token operator\">.<\/span> <span class=\"token function\">session_id<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">.<\/span> <span class=\"token string double-quoted-string\">&#034;\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ session_id() \u8fd4\u56de\u5f53\u524d\u4f1a\u8bdd\u7684\u552f\u4e00\u6807\u8bc6\u7b26&#xff08;ID&#xff09;\u3002<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u68c0\u67e5\u662f\u5426\u901a\u8fc7 Cookie \u4f20\u9012\u4f1a\u8bdd ID<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token keyword\">isset<\/span><span class=\"token punctuation\">(<\/span><span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">[<\/span><span class=\"token string single-quoted-string\">&#039;PHPSESSID&#039;<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u4f1a\u8bdd ID \u901a\u8fc7 Cookie \u4f20\u9012\u3002\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5982\u679c $_COOKIE \u4e2d\u5b58\u5728 PHPSESSID&#xff0c;\u8bf4\u660e\u4f1a\u8bdd ID \u662f\u901a\u8fc7 Cookie \u4f20\u9012\u7684\u3002<\/span><br \/>\n<span class=\"token punctuation\">}<\/span> <span class=\"token keyword\">else<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u4f1a\u8bdd ID \u672a\u901a\u8fc7 Cookie \u4f20\u9012\u3002\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5982\u679c $_COOKIE \u4e2d\u4e0d\u5b58\u5728 PHPSESSID&#xff0c;\u8bf4\u660e\u4f1a\u8bdd ID \u4e0d\u662f\u901a\u8fc7 Cookie \u4f20\u9012\u7684\u3002<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u624b\u52a8\u8bbe\u7f6e\u4e00\u4e2a\u81ea\u5b9a\u4e49 Cookie<\/span><br \/>\n<span class=\"token function\">setcookie<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;username&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;Alice&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">time<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token number\">3600<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant boolean\">true<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ setcookie() \u8bbe\u7f6e\u4e00\u4e2a\u540d\u4e3a username \u7684 Cookie&#xff0c;\u503c\u4e3a Alice\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ \u53c2\u6570\u8bf4\u660e&#xff1a;<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; &#039;username&#039;&#xff1a;Cookie \u540d\u79f0\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; &#039;Alice&#039;&#xff1a;Cookie \u503c\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; time() &#043; 3600&#xff1a;\u6709\u6548\u671f\u4e3a 1 \u5c0f\u65f6\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; &#039;\/&#039;&#xff1a;\u4f5c\u7528\u8def\u5f84\u4e3a\u6574\u4e2a\u57df\u540d\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; &#039;&#039;&#xff1a;\u57df\u540d\u4e3a\u7a7a&#xff0c;\u8868\u793a\u5f53\u524d\u57df\u540d\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; true&#xff1a;\u4ec5\u901a\u8fc7 HTTPS \u4f20\u8f93&#xff08;Secure \u6807\u5fd7&#xff09;\u3002<\/span><br \/>\n<span class=\"token comment\">\/\/ &#8211; true&#xff1a;\u7981\u6b62 JavaScript \u8bbf\u95ee&#xff08;HttpOnly \u6807\u5fd7&#xff09;\u3002<\/span><\/p>\n<p><span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5df2\u8bbe\u7f6e Cookie&#xff1a;username&#061;Alice\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u63d0\u793a\u7528\u6237 Cookie \u5df2\u8bbe\u7f6e\u3002<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u67e5\u770b\u5f53\u524d\u7684 Cookie<\/span><br \/>\n<span class=\"token function\">print_r<\/span><span class=\"token punctuation\">(<\/span><span class=\"token variable\">$_COOKIE<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u8f93\u51fa\u5f53\u524d\u6240\u6709\u7684 Cookie&#xff0c;\u5305\u62ec PHPSESSID \u548c username\u3002<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5220\u9664\u81ea\u5b9a\u4e49 Cookie<\/span><br \/>\n<span class=\"token function\">setcookie<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string single-quoted-string\">&#039;username&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;&#039;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token function\">time<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&#8211;<\/span> <span class=\"token number\">3600<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string single-quoted-string\">&#039;\/&#039;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u901a\u8fc7\u8bbe\u7f6e\u8fc7\u671f\u65f6\u95f4\u4e3a\u8fc7\u53bb\u7684\u65f6\u95f4&#xff08;time() &#8211; 3600&#xff09;&#xff0c;\u5220\u9664\u540d\u4e3a username \u7684 Cookie\u3002<\/span><\/p>\n<p><span class=\"token keyword\">echo<\/span> <span class=\"token string double-quoted-string\">&#034;\u5df2\u5220\u9664 Cookie&#xff1a;username\\\\n&#034;<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token comment\">\/\/ \u63d0\u793a\u7528\u6237 Cookie \u5df2\u5220\u9664\u3002<\/span><\/p>\n<hr \/>\n<h4>5. \u603b\u7ed3<\/h4>\n<ul>\n<li>\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u81ea\u52a8\u53d1\u9001 Cookie&#xff1f;\n<ul>\n<li>HTTP \u534f\u8bae\u89c4\u5b9a&#xff0c;\u6d4f\u89c8\u5668\u4f1a\u6839\u636e Cookie \u7684\u5c5e\u6027&#xff0c;\u5728\u6bcf\u6b21\u8bf7\u6c42\u4e2d\u81ea\u52a8\u5c06\u5339\u914d\u7684 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<\/li>\n<li>PHP \u5e95\u5c42\u505a\u4e86\u4ec0\u4e48&#xff1f;\n<ul>\n<li>\u8bbe\u7f6e\u548c\u89e3\u6790 Cookie\u3002<\/li>\n<li>\u4f7f\u7528 PHPSESSID Cookie \u7ba1\u7406\u4f1a\u8bdd\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u5982\u4f55\u4f18\u5316 Cookie \u7684\u4f7f\u7528&#xff1f;\n<ul>\n<li>\u8bbe\u7f6e Secure \u548c HttpOnly \u6807\u5fd7&#xff0c;\u589e\u5f3a\u5b89\u5168\u6027\u3002<\/li>\n<li>\u5b9a\u671f\u6e05\u7406\u65e0\u6548\u6216\u8fc7\u671f\u7684 Cookie\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb929\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff0c\u8fd9\u662f\u7531 HTTP \u534f\u8bae \u548c Cookie \u7684\u5de5\u4f5c\u673a\u5236 \u51b3\u5b9a\u7684\u3002\u6d4f\u89c8\u5668\u5b58\u50a8 Cookie\uff1a\u6d4f\u89c8\u5668\u4f1a\u6839\u636e  \u7684\u5185\u5bb9\uff0c\u5c06 Cookie \u5b58\u50a8\u5728\u672c\u5730\u3002Cookie \u7684\u5c5e\u6027\uff08\u5982\u57df\u540d\u3001\u8def\u5f84\u3001\u6709\u6548\u671f\u7b49\uff09\u51b3\u5b9a\u4e86\u5b83\u5728\u54ea\u4e9b\u8bf7\u6c42\u4e2d\u4f1a\u88ab\u53d1\u9001\u3002\u6d4f\u89c8\u5668\u53d1\u9001 Cookie\uff1a\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d\uff0c\u6d4f\u89c8\u5668\u4f1a\u6839\u636e\u8bf7\u6c42\u7684 URL \u548c Cookie \u7684\u5c5e\u6027\uff0c\u81ea\u52a8\u5c06\u5339\u914d\u7684 Cookie \u6dfb\u52a0\u5230 HTTP \u8bf7\u6c42\u5934\u4e2d\u7684  \u5b57\u6bb5\u3002\u793a\u4f8b\uff1a\uff083\uff09\u901a\u4fd7\u89e3\u91ca\u60f3\u8c61\u4f60\u53bb\u4e00\u5bb6\u5496\u5561\u5e97_cookie\u662f\u8bf7\u6c42\u65f6\u81ea\u52a8\u53d1\u9001\u7684\u5417<\/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,43,44],"topic":[],"class_list":["post-14918","post","type-post","status-publish","format-standard","hentry","category-server","tag-php","tag-43","tag-44"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \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\/14918.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb929\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff0c\u8fd9\u662f\u7531 HTTP \u534f\u8bae \u548c Cookie \u7684\u5de5\u4f5c\u673a\u5236 \u51b3\u5b9a\u7684\u3002\u6d4f\u89c8\u5668\u5b58\u50a8 Cookie\uff1a\u6d4f\u89c8\u5668\u4f1a\u6839\u636e \u7684\u5185\u5bb9\uff0c\u5c06 Cookie \u5b58\u50a8\u5728\u672c\u5730\u3002Cookie \u7684\u5c5e\u6027\uff08\u5982\u57df\u540d\u3001\u8def\u5f84\u3001\u6709\u6548\u671f\u7b49\uff09\u51b3\u5b9a\u4e86\u5b83\u5728\u54ea\u4e9b\u8bf7\u6c42\u4e2d\u4f1a\u88ab\u53d1\u9001\u3002\u6d4f\u89c8\u5668\u53d1\u9001 Cookie\uff1a\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d\uff0c\u6d4f\u89c8\u5668\u4f1a\u6839\u636e\u8bf7\u6c42\u7684 URL \u548c Cookie \u7684\u5c5e\u6027\uff0c\u81ea\u52a8\u5c06\u5339\u914d\u7684 Cookie \u6dfb\u52a0\u5230 HTTP \u8bf7\u6c42\u5934\u4e2d\u7684 \u5b57\u6bb5\u3002\u793a\u4f8b\uff1a\uff083\uff09\u901a\u4fd7\u89e3\u91ca\u60f3\u8c61\u4f60\u53bb\u4e00\u5bb6\u5496\u5561\u5e97_cookie\u662f\u8bf7\u6c42\u65f6\u81ea\u52a8\u53d1\u9001\u7684\u5417\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/14918.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T13:37:04+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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/14918.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/14918.html\",\"name\":\"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T13:37:04+00:00\",\"dateModified\":\"2025-04-18T13:37:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/14918.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/14918.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/14918.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f\"}]},{\"@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":"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \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\/14918.html","og_locale":"zh_CN","og_type":"article","og_title":"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb929\u6b21\uff0c\u70b9\u8d5e20\u6b21\uff0c\u6536\u85cf13\u6b21\u3002\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff0c\u8fd9\u662f\u7531 HTTP \u534f\u8bae \u548c Cookie \u7684\u5de5\u4f5c\u673a\u5236 \u51b3\u5b9a\u7684\u3002\u6d4f\u89c8\u5668\u5b58\u50a8 Cookie\uff1a\u6d4f\u89c8\u5668\u4f1a\u6839\u636e \u7684\u5185\u5bb9\uff0c\u5c06 Cookie \u5b58\u50a8\u5728\u672c\u5730\u3002Cookie \u7684\u5c5e\u6027\uff08\u5982\u57df\u540d\u3001\u8def\u5f84\u3001\u6709\u6548\u671f\u7b49\uff09\u51b3\u5b9a\u4e86\u5b83\u5728\u54ea\u4e9b\u8bf7\u6c42\u4e2d\u4f1a\u88ab\u53d1\u9001\u3002\u6d4f\u89c8\u5668\u53d1\u9001 Cookie\uff1a\u5728\u540e\u7eed\u8bf7\u6c42\u4e2d\uff0c\u6d4f\u89c8\u5668\u4f1a\u6839\u636e\u8bf7\u6c42\u7684 URL \u548c Cookie \u7684\u5c5e\u6027\uff0c\u81ea\u52a8\u5c06\u5339\u914d\u7684 Cookie \u6dfb\u52a0\u5230 HTTP \u8bf7\u6c42\u5934\u4e2d\u7684 \u5b57\u6bb5\u3002\u793a\u4f8b\uff1a\uff083\uff09\u901a\u4fd7\u89e3\u91ca\u60f3\u8c61\u4f60\u53bb\u4e00\u5bb6\u5496\u5561\u5e97_cookie\u662f\u8bf7\u6c42\u65f6\u81ea\u52a8\u53d1\u9001\u7684\u5417","og_url":"https:\/\/www.wsisp.com\/helps\/14918.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T13:37:04+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/14918.html","url":"https:\/\/www.wsisp.com\/helps\/14918.html","name":"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T13:37:04+00:00","dateModified":"2025-04-18T13:37:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/14918.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/14918.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/14918.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u5230\u5e95\u4e3a\u4ec0\u4e48\u6d4f\u89c8\u5668\u4f1a\u5728\u6bcf\u6b21\u8bf7\u6c42\u65f6\u81ea\u52a8\u5c06 Cookie \u53d1\u9001\u5230\u670d\u52a1\u5668\uff1f"}]},{"@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\/14918","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=14918"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/14918\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=14918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=14918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=14918"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=14918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}