{"id":31332,"date":"2024-11-25T09:29:36","date_gmt":"2024-11-25T01:29:36","guid":{"rendered":"https:\/\/fwq.ai\/blog\/31332\/"},"modified":"2024-11-25T09:29:36","modified_gmt":"2024-11-25T01:29:36","slug":"phpcms%e8%af%bb%e4%b8%8d%e5%88%b0%e7%bc%93%e5%ad%98%e6%80%8e%e4%b9%88%e5%8a%9e","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/31332\/","title":{"rendered":"phpcms\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e"},"content":{"rendered":"<p style=\"text-align: center\"><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/000\/040\/5e47646a2c882977.jpg\" class=\"aligncenter\" title=\"phpcms\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e\u63d2\u56fe\" alt=\"phpcms\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e\u63d2\u56fe\" \/><\/p>\n<p><strong>\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e<\/strong><\/p>\n<p>\u7f51\u7ad9\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u6b63\u5e38\uff0c\u5f04\u5230\u6211\u7535\u8111\u4e0a\u8fdb\u5165\u7f51\u7ad9\u540e\u53f0\uff0c\u66f4\u65b0\u7f13\u5b58\u9875\u9762\u7a7a\u767d\uff0c\u8bbf\u95ee\u9996\u9875\u8fd8\u662f\u7a7a\u767d\u3002\u8c03\u8bd5\u53d1\u73b0\u662f\u5728include\/common.inc.php\u4e2d\u6267\u884c\u5230\u4e0b\u9762\u4e0d\u6267\u884c\u4e86<\/p>\n<p>\u4ee3\u7801\u5982\u4e0b:<\/p>\n<pre>$CACHE&nbsp;=&nbsp;cache_read('common.php');&nbsp;\nif(!$CACHE)&nbsp;\n{&nbsp;\nrequire_once&nbsp;'cache.func.php';&nbsp;\ncache_all();&nbsp;\n$CACHE&nbsp;=&nbsp;cache_read('common.php');&nbsp;\n}&nbsp;\nextract($CACHE);&nbsp;\nunset($CACHE);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u63a8\u8350\uff1a<\/p>\n<p>\u6ce8\u91ca\u6389\u80fd\u8fdb\u4e86\u3002\u66f4\u65b0\u7f13\u5b58\u4e5f\u4e0d\u884c\u3002\u9996\u9875\u80fd\u770b\u5230\u4e86\uff0c\u4f46\u662f\u6539\u6587\u4ef6\u8fd8\u770b\u4e0d\u5230\u3002&nbsp;<\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<p><strong>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u7ecf\u8fc7\u4e00\u6b65\u6b65\u7684\u8c03\u8bd5<strong>cache_read<\/strong>\u51fd\u6570\uff0c\u7ec8\u4e8e\u89e3\u51b3\u4e86\uff0c\u56e0\u4e3a<strong>php.ini<\/strong>\u4e2d\u7684<strong>memory_limit<\/strong>\u7684\u503c\u592a\u5c0f\uff0c\u6539\u5927\u4e9b\u5c31\u884c\u4e86\u3002<\/p>\n<p>\u91cd\u542fapache \u6216\u8005\u662f\u5728&nbsp;<\/p>\n<pre>$CACHE&nbsp;=&nbsp;cache_read('common.php');<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u524d\u9762\u52a0\u4e0a\u4e0b\u9762\u4e00\u53e5\u8bdd<\/p>\n<pre>@ini_set('memory_limit',&nbsp;'128M');<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8bbe\u7f6ephp\u53ef\u4ee5\u4f7f\u7528\u7684\u5185\u5b58\u5927\u5c0f\u4e3a64M\u3002<\/p>\n<p>\u76f8\u5173\u6587\u7ae0\u63a8\u8350\uff1a<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e \u7f51\u7ad9\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\u6b63\u5e38\uff0c\u5f04\u5230\u6211\u7535\u8111\u4e0a\u8fdb\u5165\u7f51\u7ad9\u540e\u53f0\uff0c\u66f4\u65b0\u7f13\u5b58\u9875\u9762\u7a7a\u767d\uff0c\u8bbf\u95ee\u9996\u9875\u8fd8\u662f\u7a7a\u767d\u3002\u8c03\u8bd5\u53d1\u73b0\u662f\u5728include\/common.inc.php\u4e2d\u6267\u884c\u5230\u4e0b\u9762\u4e0d\u6267\u884c\u4e86 \u4ee3\u7801\u5982\u4e0b: $CACHE&nbsp;=&nbsp;cache_read(&#8216;common.php&#8217;);&nbsp; if(!$CACHE)&nbsp; {&nbsp; require_once&nbsp;&#8216;cache.func.php&#8217;;&nbsp; cache_all();&nbsp; $CACHE&nbsp;=&nbsp;cache_read(&#8216;common.php&#8217;);&nbsp; }&nbsp; extract($CACHE);&nbsp; unset($CACHE); \u767b\u5f55\u540e\u590d\u5236 \u63a8\u8350\uff1a \u6ce8\u91ca\u6389\u80fd\u8fdb\u4e86\u3002\u66f4\u65b0\u7f13\u5b58\u4e5f\u4e0d\u884c\u3002\u9996\u9875\u80fd\u770b\u5230\u4e86\uff0c\u4f46\u662f\u6539\u6587\u4ef6\u8fd8\u770b\u4e0d\u5230\u3002&nbsp; \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u89e3\u51b3\u65b9\u6cd5\uff1a \u7ecf\u8fc7\u4e00\u6b65\u6b65\u7684\u8c03\u8bd5cache_read\u51fd\u6570\uff0c\u7ec8\u4e8e\u89e3\u51b3\u4e86\uff0c\u56e0\u4e3aphp.ini\u4e2d\u7684memory_limit\u7684\u503c\u592a\u5c0f\uff0c\u6539\u5927\u4e9b\u5c31\u884c\u4e86\u3002 \u91cd\u542fapache \u6216\u8005\u662f\u5728&nbsp; $CACHE&nbsp;=&nbsp;cache_read(&#8216;common.php&#8217;); \u767b\u5f55\u540e\u590d\u5236 \u524d\u9762\u52a0\u4e0a\u4e0b\u9762\u4e00\u53e5\u8bdd @ini_set(&#8216;memory_limit&#8217;,&nbsp;&#8216;128M&#8217;); \u767b\u5f55\u540e\u590d\u5236 \u8bbe\u7f6ephp\u53ef\u4ee5\u4f7f\u7528\u7684\u5185\u5b58\u5927\u5c0f\u4e3a64M\u3002 \u76f8\u5173\u6587\u7ae0\u63a8\u8350\uff1a \u4ee5\u4e0a\u5c31\u662f\u8bfb\u4e0d\u5230\u7f13\u5b58\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-31332","post","type-post","status-publish","format-standard","hentry","category-cms"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31332","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=31332"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/31332\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=31332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=31332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=31332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}