{"id":30709,"date":"2023-07-13T22:21:06","date_gmt":"2023-09-07T02:40:56","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/"},"modified":"2025-08-12T20:27:03","modified_gmt":"2025-08-12T12:27:03","slug":"%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/","title":{"rendered":"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406"},"content":{"rendered":"<h1>\u5927\u81f4\u610f\u601d<\/h1>\n<p>\u6211\u662fTechTrain\u7684\u5de5\u4f5c\u4eba\u5458\uff0c\u4e5f\u662f\u5bfc\u5e08\u7684\u82cf\u3002<br \/>\n\u8fd9\u6b21\uff0c\u6211\u6574\u7406\u4e86\u4e00\u4e9b\u5173\u4e8e\u4f1a\u8bdd\u7ba1\u7406\u65b9\u9762\u4e0d\u660e\u767d\u7684\u95ee\u9898\u3002<\/p>\n<h1>\u9996\u5148\uff0c\u4f1a\u8bae\u662f\u4ec0\u4e48<\/h1>\n<p>\u4f1a\u8bdd\u662f\u6307\u5728\u8bbf\u95ee\u7f51\u7ad9\u5e76\u8fdb\u884c\u4e00\u7cfb\u5217\u64cd\u4f5c\u7684\u8fc7\u7a0b\u3002<br \/>\n\u4ece\u8bbf\u95ee\u7f51\u7ad9\u5f00\u59cb\u5230\u79bb\u5f00\u8be5\u7f51\u7ad9\u6216\u5173\u95ed\u6d4f\u89c8\u5668\uff0c\u5373\u4e3a\u4e00\u4e2a\u4f1a\u8bdd\u3002<\/p>\n<p>\u6bcf\u4e2aWeb\u670d\u52a1\u5668\u90fd\u6709\u4e00\u4e2a\u552f\u4e00\u7684ID\uff0c\u7528\u4e8e\u8de8\u591a\u4e2a\u9875\u9762\u7684Web\u7cfb\u7edf\uff0c<br \/>\n\u901a\u8fc7\u4f7f\u7528\u8fd9\u4e2aID\u6765\u4fdd\u5b58\u548c\u4f7f\u7528\u6bcf\u4e2a\u7528\u6237\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u5728\u4f7f\u7528\u8fd9\u4e2a\u4f1a\u8bdd\u65b9\u6cd5\u4e2d\u6700\u5178\u578b\u7684\u662f\u901a\u8fc7Web\u9875\u9762\u8fdb\u884c\uff0c\u800c\u6700\u5e38\u7528\u7684\u529f\u80fd\u662f\u767b\u5f55\u548c\u767b\u51fa\u3002<\/p>\n<p>\u5c06\u7528\u6237\u4ece\u767b\u5f55\u5230\u6ce8\u9500\u7684\u6574\u4e2a\u8fc7\u7a0b\u89c6\u4e3a\u4e00\u4e2a\u4f1a\u8bdd\uff0c\u5e76\u5728\u6b64\u671f\u95f4\u4fdd\u5b58\u7528\u6237ID\u3001\u5bc6\u7801\u7b49\u72b6\u6001\u4fe1\u606f\u3002<\/p>\n<h1>\u5728PHP\u4e2d\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002<\/h1>\n<p>\u5c06\u6587\u4ef6\u4fdd\u5b58\u5230\u670d\u52a1\u5668\u3002\u5411Cookie\u4e2d\u5b58\u50a8\u7684\u6587\u4ef6\u5206\u914d\u4e00\u4e2a\u7c7b\u4f3c\u4e8e\u5bc6\u94a5\u7684\u503c\uff08ID\uff09\uff0c\u7528\u4e8e\u67e5\u8be2\u81ea\u5df1\u7684Session\u3002<\/p>\n<h1>\u9664\u4e86\u9ed8\u8ba4\u9009\u9879\u5916\u7684\u53ef\u884c\u65b9\u6cd5(\u4f18\u70b9\u548c\u7f3a\u70b9)\u3002<\/h1>\n<p>\u987a\u4fbf\u63d0\u4e00\u4e0b\uff0c\u5bf9\u4e8e\u4f1a\u8bdd\u7684\u7ba1\u7406\u65b9\u6cd5\u6709\u51e0\u79cd\uff0c\u4f46\u4e3b\u8981\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<h2>\u66f2\u5947\u997c\u5e72<\/h2>\n<p>\u4ee5\u7c7b\u4f3c\u4e8eRails\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u7684\u65b9\u5f0f\uff0c\u5c06\u6240\u6709\u6570\u636e\u4fdd\u5b58\u5728\u5ba2\u6237\u7aef\u7684cookie\u4e2d\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>\u597d\u5904<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u306b\u30c7\u30fc\u30bf\u3092\u305f\u3081\u8fbc\u307e\u306a\u3044\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u306e\u8ca0\u8377\u3092\u6c17\u306b\u3057\u306a\u3044\u3067\u826f\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3092\u5206\u6563\u3055\u305b\u3066\u3082\u4e00\u8cab\u6027\u3092\u6301\u305f\u305b\u3089\u308c\u308b<\/ul>\n<h3>\u7f3a\u70b9<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30e6\u30fc\u30b6\u5074\u306b\u30c7\u30fc\u30bf\u304c\u3042\u308b\u305f\u3081\u3001\u6539\u3056\u3093\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308b\uff08Rails\u306f\u6697\u53f7\u5316\u306b\u3088\u3063\u3066\u5bfe\u7b56\u3057\u3066\u307e\u3059\u304c\uff09<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Cookie\u306e\u4ed5\u69d8\u4e0a\u30014KB\u306e\u5bb9\u91cf\u5236\u9650\u304c\u3042\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">Cookie\u3092\u4e57\u3063\u53d6\u3089\u308c\u305f\u5834\u5408\u7b49\u3067\u3082\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u304b\u3089\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u7834\u68c4\u3059\u308b\u624b\u6bb5\u304c\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30e6\u30fc\u30b6\u304ccookie\u3092\u6709\u52b9\u306b\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u30ed\u30b0\u30a4\u30f3\u60c5\u5831\u306a\u3069\u304c\u3046\u307e\u304f\u4fdd\u5b58\u3055\u308c\u306a\u3044<\/ul>\n<h2>\u6587\u4ef6<\/h2>\n<p>\u4ece\u6846\u67b6\u7684\u89d2\u5ea6\u6765\u770b\uff0cLaravel\u548cCakePHP\u9ed8\u8ba4\u4f7f\u7528Cookie\u6765\u4fdd\u5b58\u4f1a\u8bddID\uff0c\u5e76\u5c06\u5b9e\u9645\u6570\u636e\u4f5c\u4e3a\u6587\u4ef6\u5b58\u50a8\u5728\u670d\u52a1\u5668\u7aef\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>\u597d\u5904<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u306b\u30c7\u30fc\u30bf\u304c\u3042\u308b\u306e\u3067\u6539\u3056\u3093\u3092\u56de\u907f\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u5bb9\u91cf\u5236\u9650\u304c\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u7834\u68c4\u304c\u3067\u304d\u308b<\/ul>\n<h3>\u7f3a\u70b9<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3092\u5206\u6563\u3055\u305b\u305f\u5834\u5408\u3001\u4e00\u8cab\u6027\u304c\u78ba\u4fdd\u3067\u304d\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">1\u30bb\u30c3\u30b7\u30e7\u30f3\u306b\u3064\u304d1\u30d5\u30a1\u30a4\u30eb\u751f\u6210\u3055\u308c\u308b\u306e\u3067\u3001\u5927\u91cf\u306b\u30bb\u30c3\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u304c\u51fa\u6765\u3066\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u8ca0\u62c5\u304c\u639b\u304b\u308b<\/ul>\n<h2>\u5173\u7cfb\u6570\u636e\u5e93 (RDB)<\/h2>\n<p>\u53ea\u9700\u5c06\u4f1a\u8bddID\u4fdd\u5b58\u5728Cookie\u4e2d\uff0c\u5e76\u5c06\u5b9e\u9645\u6570\u636e\u5b58\u50a8\u5728MySQL\u7b49\u670d\u52a1\u5668\u7aef\u7684\u5173\u7cfb\u6570\u636e\u5e93\u4e2d\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>\u4f18\u70b9<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u306b\u30c7\u30fc\u30bf\u304c\u3042\u308b\u306e\u3067\u6539\u3056\u3093\u3092\u56de\u907f\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u5bb9\u91cf\u5236\u9650\u304c\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u7834\u68c4\u304c\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3092\u5206\u6563\u3055\u305b\u3066\u3082\u4e00\u8cab\u6027\u3092\u6301\u305f\u305b\u3089\u308c\u308b<\/ul>\n<h3>\u7f3a\u70b9<\/h3>\n<ul class=\"post-ul\">RDB\u306f\u5927\u91cf\u306e\u540c\u6642I\/O\u306b\u5f31\u3044\u306e\u3067\u3001\u30a2\u30af\u30bb\u30b9\u304c\u5897\u3048\u308b\u3068\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u4e00\u6c17\u306b\u30d1\u30f3\u30af\u3059\u308b\u3002\u3057\u304b\u3082\u30b9\u30b1\u30fc\u30eb\u3057\u3065\u3089\u3044\u3002<\/ul>\n<h2>KVS\uff08\u975e\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff09<\/h2>\n<p>\u53ea\u4f7f\u7528Cookie\u5b58\u50a8\u4f1a\u8bddID\uff0c\u5e76\u5c06\u771f\u5b9e\u6570\u636e\u653e\u5728\u670d\u52a1\u5668\u7aef\u7684KVS\uff0c\u4f8b\u5982Memcached\u3001Redis\u7b49\u7684\u65b9\u6cd5\u3002<\/p>\n<h3>\u597d\u5904<\/h3>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u306b\u30c7\u30fc\u30bf\u304c\u3042\u308b\u306e\u3067\u6539\u3056\u3093\u3092\u56de\u907f\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30c7\u30fc\u30bf\u5bb9\u91cf\u5236\u9650\u304c\u306a\u3044<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30b5\u30fc\u30d0\u30b5\u30a4\u30c9\u3067\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u7834\u68c4\u304c\u3067\u304d\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b5\u30fc\u30d0\u3092\u5206\u6563\u3055\u305b\u3066\u3082\u4e00\u8cab\u6027\u3092\u6301\u305f\u305b\u3089\u308c\u308b<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\u5927\u91cf\u306e\u540c\u6642I\/O\u306b\u5f37\u304f\u3001\u30a2\u30af\u30bb\u30b9\u304c\u5897\u5927\u3057\u3066\u3082\u5927\u4e08\u592b\uff01<\/ul>\n<h3>\u52a3\u52bf<\/h3>\n<ul class=\"post-ul\">\u30bb\u30c3\u30b7\u30e7\u30f3\u5c02\u7528\u306b\u3072\u3068\u3064\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u304c\u8ffd\u52a0\u3055\u308c\u308b\u306e\u3067\u30b3\u30b9\u30c8\u304c\u5897<\/ul>\n<h2>\u5185\u5b58<\/h2>\n<h1>\u4e00\u79cd\u5e38\u89c1\u7684\u5b9e\u65bd\u65b9\u6cd5\u662f\u4e0a\u8ff0\u6280\u672f\u624b\u6bb5\u3002<\/h1>\n<h2>\u997c\u5e72<\/h2>\n<p>\u5982\u679c\u60f3\u5728\u6d4f\u89c8\u5668\u5173\u95ed\u540e\u4ecd\u7136\u4f7f\u7528\u8fd9\u4e2a\u4f1a\u8bddCookie\uff0c\u8bf7\u5728session_start()\u4e4b\u524d\u8c03\u7528session_set_cookie_params()\u3002<\/p>\n<p>\u5229\u7528\u8fd9\u4e9b\u6807\u51c6\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u50cf\u4f7f\u7528PHP\u9ed8\u8ba4\u7684\u65b9\u6cd5\u5904\u7406\u6587\u4ef6\u4e00\u6837\u5c06\u4f1a\u8bdd\u4fdd\u5b58\u5728cookie\u4e2d\u3002<\/p>\n<p>session_get_cookie_params \u53d6\u5f97\u4f1a\u8bdd\u7684cookie\u53c2\u6570<br \/>\nsession.cookie_lifetime \u4f1a\u8bdd\u7684cookie\u751f\u5b58\u671f<br \/>\nsession.cookie_path \u4f1a\u8bdd\u7684cookie\u8def\u5f84<br \/>\nsession.cookie_domain \u4f1a\u8bdd\u7684cookie\u57df\u540d<br \/>\nsession.cookie_secure \u4f1a\u8bdd\u7684cookie\u5b89\u5168\u6027<br \/>\nsession.cookie_httponly \u4f1a\u8bdd\u7684cookie\u4ec5\u9650HTTP<\/p>\n<h2>\u6587\u6863<\/h2>\n<p>\u8fd9\u662fPHP\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u3002\u5982\u679c\u60a8\u4ec5\u4ec5\u4f7f\u7528\u4e86\u6807\u51c6\u51fd\u6570session_start\uff0c\u800c\u6ca1\u6709\u505a\u4efb\u4f55\u8003\u8651\u7684\u8bdd\uff0c\u4f1a\u8bdd\u4f1a\u88ab\u4fdd\u5b58\u4e3a\u4e00\u4e2a\u6587\u4ef6\uff0c\u5e76\u5b58\u653e\u5728session.save_path\uff08\u9ed8\u8ba4\u4e3a\/tmp\uff09\u76ee\u5f55\u4e2d\u3002<\/p>\n<h2>\u5173\u7cfb\u578b\u6570\u636e\u5e93<\/h2>\n<h3>\u521b\u5efa\u7528\u4e8e\u4f1a\u8bdd\u4fdd\u5b58\u7684\u6570\u636e\u5e93\u3002<\/h3>\n<p>\u4f5c\u4e3a\u4e00\u4e2a\u53ef\u80fd\u7684\u8868\u683c\u7ed3\u6784\uff0c\u5927\u6982\u662f\u8fd9\u6837\u5b50\u7684\u3002<\/p>\n<div>\n<div class=\"post-table\">\u30ab\u30e9\u30e0\u540d\u578b\u5185\u5bb9idint\u30bb\u30c3\u30b7\u30e7\u30f3ID\u3002cookie\u306ePHPSESSID\u306e\u5024\u3002datastr\u30bb\u30c3\u30b7\u30e7\u30f3\u30c7\u30fc\u30bf\u3002\u3053\u3053\u306b\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u30c7\u30fc\u30bf\u304c\u4fdd\u5b58\u3055\u308c\u307e\u3059\u3002createddate\u30bb\u30c3\u30b7\u30e7\u30f3\u4f5c\u6210\u65e5\u6642\u3002\u30c7\u30fc\u30bf\u304c\u66f4\u65b0\u3055\u308c\u308b\u305f\u3073\u306b\u3053\u3053\u306e\u65e5\u4ed8\u3082\u66f4\u65b0\u3002<\/div>\n<\/div>\n<h3>\u521b\u5efa\u4e00\u4e2a\u4f1a\u8bdd\u7c7b<\/h3>\n<p>\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u5c06\u4f1a\u8bdd\u4fe1\u606f\u4fdd\u5b58\u5728\u5df2\u521b\u5efa\u7684\u6570\u636e\u8868\u4e2d\u7684PHP\u7c7b\u3002\u7531\u4e8e\u5c06\u5904\u7406\u4efb\u52a1\u653e\u5728\u4e86\u6570\u636e\u5e93\u4e2d\uff0c\u6240\u4ee5\u6216\u8bb8\u5728MVC\u4e2d\u5c06\u5904\u7406\u4efb\u52a1\u653e\u5728\u6a21\u578b\u4e2d\u53ef\u80fd\u662f\u66f4\u597d\u7684\u9009\u62e9\u3002<\/p>\n<p>\u5728 Session \u7c7b\u4e2d\u9700\u8981\u7684\u51fd\u6570\u6709\u4ee5\u4e0b\u516d\u4e2a\u3002<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">open<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">close<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">read<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">write<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">\n<li style=\"list-style-type: none;\">\n<ul class=\"post-ul\">destroy<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<ul class=\"post-ul\">gc<\/ul>\n<p>PHP5.4\u53ca\u4ee5\u4e0a\u7248\u672c\u53ef\u4ee5\u901a\u8fc7\u5728\u4f1a\u8bdd\u7c7b\u4e2d\u4f7f\u7528SessionHandlerInterface\u63a5\u53e3\u8f7b\u677e\u5b9e\u73b0\u3002\u6b64\u5916\uff0c\u5728php5.5.1\u53ca\u4ee5\u4e0a\u7248\u672c\u4e2d\uff0c\u53ef\u4ee5\u5728session_set_save_handler\u7684\u7b2c\u4e03\u4e2a\u53c2\u6570\u4e2d\u6307\u5b9acreate_sid\u56de\u8c03\u51fd\u6570\u3002\u53ef\u4ee5\u5229\u7528\u8be5\u51fd\u6570\u6765\u53d1\u884c\u81ea\u5b9a\u4e49\u7684\u4f1a\u8bddID\uff0c\u4f46\u8981\u6ce8\u610f\u907f\u514d\u4f1a\u8bdd\u52ab\u6301\u7684\u95ee\u9898\u3002<\/p>\n<h2>\u8a2d\u8a08\u6642\u7684\u6ce8\u610f\u4e8b\u9805 sh\u00ed de<\/h2>\n<h3>\u4f7f\u7528InnoDB<\/h3>\n<p>\u8fd9\u662f\u5fc5\u987b\u7684\u3002\u4e0d\u4e00\u5b9a\u662fInnoDB\uff0c\u4f46\u8981\u652f\u6301\u201c\u884c\u9501\u201d\u5f88\u91cd\u8981\u3002<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u7531\u4e8e\u63d2\u5165\/\u66f4\u65b0\u64cd\u4f5c\u8f83\u591a\uff0c\u4f7f\u7528MyISAM\u5c06\u5bfc\u81f4\u9891\u7e41\u7684\u6570\u636e\u8868\u9501\u5b9a\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u4e0a\u8ff0\u64cd\u4f5c\u4f1a\u5bfc\u81f4\u5199\u9501\u5b9a\uff0c\u56e0\u6b64\u8bfb\u64cd\u4f5c\u4e5f\u4f1a\u88ab\u963b\u585e\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u7531\u4e8e\u884c\u9501\u5b9a\uff0c\u63d2\u5165\u3001\u66f4\u65b0\u548c\u5220\u9664\u64cd\u4f5c\u4e4b\u95f4\u4e0d\u4f1a\u53d1\u751f\u7ade\u4e89\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5f53\u7136\uff0c\u4e0e\u67e5\u8be2\u64cd\u4f5c\u65e0\u7ade\u4e89\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u8fd9\u5bf9\u4e8e\u6267\u884c\u5220\u9664\u64cd\u4f5c\u975e\u5e38\u91cd\u8981\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u5728\u8fdb\u884cmysqldump\u65f6\u4e0d\u9700\u8981\u9501\u5b9a\u8868\u683c\u3002<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u4ece\u4e0d\u505c\u6b62\u670d\u52a1\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u8fd9\u662f\u76f8\u5f53\u91cd\u8981\u7684\u3002<\/ol>\n<p>\u53ea\u9700\u8981\u4e00\u4e2a\u9009\u62e9\uff0c\u4e0b\u9762\u662f\u5728\u4e2d\u6587\u91cc\u7684\u91ca\u4e49\uff1a<br \/>\n&#8211; \u4f7f\u7528&#8211;single-transaction\u9009\u9879<br \/>\n\u4e3a\u4e86\u4f7f\u7528\u884c\u7ea7\u9501\u673a\u5236\uff0c\u5fc5\u987b\u62e5\u6709\u4e3b\u952e\u6216\u552f\u4e00\u7ea6\u675f\u7684\u5217\u3002<\/p>\n<h3>\u5728\u4e2d\u56fd\u7ffb\u8bd1\u7684\u539f\u751f\u65b9\u5f0f\u662f\uff1a\u201c\u8bbe\u7f6e\u4e13\u7528\u4e8e\u4f1a\u8bdd\u7684\u6570\u636e\u5e93\u670d\u52a1\u5668\u3002\u201d (Set up a dedicated database server for sessions)<\/h3>\n<p>\u5982\u679c\u4e3b\u6570\u636e\u5e93\u4e2d\u5b58\u5728\u4f1a\u8bdd\u6570\u636e\uff0c\u5219\u53ef\u80fd\u4f1a\u5bf9\u5176\u4ed6\u6570\u636e\u4ea7\u751f\u8d1f\u8f7d\u5f71\u54cd\uff0c\u56e0\u6b64\u6211\u4eec\u8ba4\u4e3a\u6700\u597d\u4e0d\u5bf9\u4f1a\u8bdd\u8fdb\u884c\u590d\u5236\uff08\u540e\u9762\u6709\u63d0\u53ca\uff09\u3002<br \/>\n\u5982\u679c\u4e3b\u6570\u636e\u5e93\u4e2d\u6709\u4f1a\u8bdd\u6570\u636e\uff0c\u5bf9\u5176\u4ed6\u6570\u636e\u7684\u8d1f\u8f7d\u4e5f\u53ef\u80fd\u4f1a\u6709\u5f71\u54cd\uff0c\u56e0\u6b64\u6211\u4eec\u8ba4\u4e3a\u6700\u597d\u4e0d\u8fdb\u884c\u4f1a\u8bdd\u7684\u590d\u5236\uff08\u5982\u540e\u6587\u6240\u8ff0\uff09\u3002<\/p>\n<h2>KVS\uff08\u975e\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff09<\/h2>\n<p>\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528PHP\u4e2d\u7684PHPRedis\u7b49\u5de5\u5177\u76f8\u5bf9\u5bb9\u6613\u5730\u5b9e\u73b0\u3002\uff08\u4f46\u662fPHPRedis\u53ea\u662f\u5176\u4e2d\u7684\u4e00\u4e2a\u9009\u62e9\uff09\u628aPHP\u4f1a\u8bdd\u4fdd\u5b58\u5230PhpRedis\u4e2d\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u5b9e\u73b0\u53c2\u8003\uff0c\u975e\u5e38\u597d\u3002\u8c22\u8c22\u3002<\/p>\n<h2>\u5185\u5b58<\/h2>\n<p>\u5982\u679c\u662fPHP5.5\u6216\u66f4\u65b0\u7684\u7248\u672c\uff0c\u5728\u76f8\u5e94\u7684\u670d\u52a1\u5668\u4e0a\u5b89\u88c5Apcu\uff1b\u5982\u679c\u662f\u4e4b\u524d\u7684\u7248\u672c\uff0c\u5219\u9700\u8981\u5b89\u88c5apc\u3002\u8fd9\u6837\u5c31\u53ef\u4ee5\u4f7f\u7528apcu(apc)\u51fd\u6570\u7cfb\u5217\u8fdb\u884c\u4fe1\u606f\u7684\u5b58\u50a8\u7b49\u64cd\u4f5c\u3002<\/p>\n<p>\u5f53\u6211\u5b9e\u9645\u5c1d\u8bd5\u7684\u65f6\u5019\uff0c\u6211\u4f7f\u7528\u4ee5\u4e0b\u4f5c\u4e3a\u7b80\u5355\u53c2\u8003\u3002\u975e\u5e38\u611f\u8c22\u3002<br \/>\n\u5c06\u4f1a\u8bdd\u4fdd\u5b58\u5728\u5185\u5b58\u4e2d\u3002<\/p>\n<h1>\u901a\u5e38\u6765\u8bf4<\/h1>\n<p>\u5728\u4f7f\u7528\u5173\u7cfb\u6570\u636e\u5e93\uff08RDB\uff09\u6765\u7ba1\u7406\u4f1a\u8bdd\u7684\u60c5\u51b5\u76f8\u5f53\u666e\u904d\u3002<br \/>\n\u5bf9\u4e8e\u6d41\u91cf\u8f83\u5927\u7684\u7f51\u7ad9\u6765\u8bf4\uff0c\u4f1a\u8bdd\u7684\u7ba1\u7406\u4f1a\u6d88\u8017\u5927\u91cf\u7684\u8ba1\u7b97\u80fd\u529b\u3002<br \/>\n\u4f7f\u7528\u952e\u503c\u5b58\u50a8\uff08NoSQL\uff09\u53ef\u4ee5\u671f\u671b\u8f7b\u677e\u83b7\u5f97\u663e\u8457\u7684\u6548\u679c\u3002<br \/>\n\u5728\u8fd9\u65b9\u9762\uff0c\u6700\u597d\u6839\u636e\u8d44\u91d1\u548c\u4eba\u529b\u6210\u672c\u7684\u5e73\u8861\u6765\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<h1>\u8fd9\u662f\u6211\u4e2a\u4eba\u7684\u601d\u8003\u6216\u8005\u8865\u5145\u3002<\/h1>\n<h2>\u5229\u7528\u6587\u4ef6\u7f13\u5b58\u65f6\u7684\u6587\u4ef6\u5171\u4eab\u3002<\/h2>\n<h3>\u63d0\u524d\u6761\u4ef6<\/h3>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\u4f7f\u7528\u6587\u4ef6\u7f13\u5b58\u7684WEB\u670d\u52a1\u5668\u6b63\u5728\u8fdb\u884c\u591a\u91cd\u590d\u5236<\/ol>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<ol>\u4f7f\u7528GlusterFS\u5c06\u4fdd\u5b58\u7684\u6587\u4ef6\u7f13\u5b58\u76ee\u5f55\u5171\u4eab\u7ed9\u591a\u4e2a\u670d\u52a1\u5668<\/ol>\n<p>\u53ea\u8981\u662f\u5171\u4eab\u7684\uff0c\u65e0\u8bba\u662f\u4e0d\u662f\u4f7f\u7528GlusterFS\uff0c\u90fd\u53ef\u4ee5\u5c06\u5176\u89c6\u4e3a\u540c\u6837\u7684\u6761\u4ef6\uff0c\u5bf9\u4e8e\u7b2c3\u70b9\u6ca1\u6709\u95ee\u9898\u3002<\/p>\n<h3>\u53ef\u80fd\u4f1a\u589e\u52a0\u8bfb\u53d6\u8d1f\u8f7d<\/h3>\n<p>\u5f53\u6ee1\u8db3\u4ee5\u4e0a\u6240\u8ff0\u7684\u524d\u63d0\u6761\u4ef6\u65f6\uff0c\u6bcf\u4e2aWEB\u670d\u52a1\u5668\u5bf9\u4e8e\u4e00\u4e2a\u76ee\u5f55\u53ef\u80fd\u4f1a\u6267\u884c\u8fc7\u591a\u7684\u8bfb\u53d6\u548c\u5199\u5165\u64cd\u4f5c\uff0c\u5bfc\u81f4\u5904\u7406\u90e8\u5206\u6210\u4e3a\u74f6\u9888\uff0c\u4ece\u800c\u4f7f\u5f97\u7cfb\u7edf\u7684\u8fd0\u884c\u53d8\u5f97\u7f13\u6162\u3002<\/p>\n<p>\u9664\u975e\u6ca1\u6709\u5927\u91cf\u7684\u6280\u672f\u503a\u52a1\u95ee\u9898\uff0c\u5426\u5219\u6700\u597d\u5c3d\u65e9\u91c7\u53d6\u4e00\u4e9b\u6539\u53d8\uff0c\u4f8b\u5982\u4f7f\u7528KVS\u7b49\u673a\u5236\u6765\u8fdb\u884c\u4f18\u5316\u3002<\/p>\n<h1>\u5176\u4ed6\u4e00\u4e9b\u53c2\u8003<\/h1>\n<p>\u611b\u5bb6\u7fa4\u7d44-\u5c07PHP\u7684\u6703\u8a71\u4fe1\u606f\u5132\u5b58\u5230\u6578\u64da\u5eab\uff08MySQL\uff09\u4e2d\uff01<br \/>\n\u6162\u821e-\u95dc\u65bc\u4f7f\u7528\u6578\u64da\u5eab\u7ba1\u7406\u6703\u8a71\u6578\u64da<br \/>\n\u4f7f\u7528zend-session\u5c07\u6703\u8a71\u4fe1\u606f\u4fdd\u5b58\u5230\u6578\u64da\u5eab\u4e2d<br \/>\n\u5c07PHP\u6703\u8a71\u4fdd\u5b58\u5230PhpRedis\u4e2d<br \/>\nAPC\u7528\u6236\u7de9\u5b58-PHP\u5b98\u65b9\u6587\u6a94<br \/>\n\u66f4\u6539PHP\u884c\u70ba-PHP\u5b98\u65b9\u6587\u6a94<br \/>\nAPC\u88abAPCu\u548cZend OPcache\u53d6\u4ee3\u7684\u539f\u56e0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5927\u81f4\u610f\u601d \u6211\u662fTechTrain\u7684\u5de5\u4f5c\u4eba\u5458\uff0c\u4e5f\u662f\u5bfc\u5e08\u7684\u82cf\u3002 \u8fd9\u6b21\uff0c\u6211\u6574\u7406\u4e86\u4e00\u4e9b\u5173\u4e8e\u4f1a\u8bdd\u7ba1\u7406\u65b9\u9762\u4e0d\u660e\u767d\u7684\u95ee\u9898\u3002  [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-30709","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0\" \/>\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.silicloud.com\/zh\/blog\/\u5173\u4e8ephp\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8ephp\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-09-07T02:40:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-12T12:27:03+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\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.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/\",\"name\":\"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-09-07T02:40:56+00:00\",\"dateModified\":\"2025-08-12T12:27:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"description\":\"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0","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.silicloud.com\/zh\/blog\/\u5173\u4e8ephp\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406","og_description":"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5173\u4e8ephp\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-09-07T02:40:56+00:00","article_modified_time":"2025-08-12T12:27:03+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/","name":"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-09-07T02:40:56+00:00","dateModified":"2025-08-12T12:27:03+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"description":"\u5173\u4e8e\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5173\u4e8ePHP\u4e2d\u7684\u4f1a\u8bdd\u7ba1\u7406"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%85%b3%e4%ba%8ephp%e4%b8%ad%e7%9a%84%e4%bc%9a%e8%af%9d%e7%ae%a1%e7%90%86\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=30709"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30709\/revisions"}],"predecessor-version":[{"id":92177,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/30709\/revisions\/92177"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=30709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=30709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=30709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}