{"id":28430,"date":"2024-11-24T08:05:35","date_gmt":"2024-11-24T00:05:35","guid":{"rendered":"https:\/\/fwq.ai\/blog\/28430\/"},"modified":"2024-11-24T08:05:35","modified_gmt":"2024-11-24T00:05:35","slug":"phpini-%e6%a6%82%e8%bf%b0%ef%bc%9a%e6%8f%90%e9%ab%98%e6%80%a7%e8%83%bd%e3%80%81%e5%ae%89%e5%85%a8%e6%80%a7%e5%92%8c%e7%81%b5%e6%b4%bb%e6%80%a7","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/28430\/","title":{"rendered":"phpini \u6982\u8ff0\uff1a\u63d0\u9ad8\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u7075\u6d3b\u6027"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173214947779516.jpg\" class=\"aligncenter\" title=\"phpini \u6982\u8ff0\uff1a\u63d0\u9ad8\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u7075\u6d3b\u6027\u63d2\u56fe\" alt=\"phpini \u6982\u8ff0\uff1a\u63d0\u9ad8\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u7075\u6d3b\u6027\u63d2\u56fe\" \/><\/p>\n<h3> \u76ee\u5f55 <\/h3>\n<ol>\n<li>\n<p><strong>php.ini\u7b80\u4ecb<\/strong><\/p>\n<ul>\n<li>\u4ec0\u4e48\u662f php.ini\uff1f<\/li>\n<li> \u5b83\u5f88\u91cd\u8981\uff1f<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>php.ini \u7684\u5173\u952e\u65b9\u9762<\/strong><\/p>\n<ul>\n<li>\u9519\u8bef\u5904\u7406<\/li>\n<li>\u8d44\u6e90\u9650\u5236<\/li>\n<li>\u5b89\u5168\u8bbe\u7f6e<\/li>\n<li>\u4f1a\u8bdd\u7ba1\u7406<\/li>\n<li>\u65f6\u533a\u914d\u7f6e<\/li>\n<li>\u6587\u4ef6\u4e0a\u4f20\u9650\u5236<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>php.ini \u5982\u4f55\u5f71\u54cd PHP \u6027\u80fd<\/strong><\/p>\n<ul>\n<li>\u5185\u5b58\u548c\u6267\u884c\u9650\u5236<\/li>\n<li>\u7f13\u5b58\u673a\u5236<\/li>\n<li>\u5f00\u53d1\u4e0e\u751f\u4ea7\u4e2d\u7684\u9519\u8bef\u5904\u7406<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u4e3a\u4ec0\u4e48 php.ini \u5bf9\u4e8e PHP \u5f00\u53d1\u5f88\u91cd\u8981<\/strong><\/p>\n<p><span>\u7acb\u5373\u5b66\u4e60<\/span>\u201c\u201d\uff1b<\/p>\n<ul>\n<li>\u81ea\u5b9a\u4e49 PHP \u884c\u4e3a<\/li>\n<li>\u589e\u5f3a\u5b89\u5168\u6027<\/li>\n<li>\u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u6027\u80fd<\/li>\n<li>\u7b80\u5316\u6545\u969c\u6392\u9664<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>php.ini \u7684\u4f4d\u7f6e<\/strong><\/p>\n<ul>\n<li>Windows\u3001Linux\/Unix \u548c Web \u5806\u6808\u4e0a\u7684\u5e38\u89c1\u4f4d\u7f6e\uff08\u4f8b\u5982 XAMPP\u3001WAMP\u3001MAMP\uff09<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5982\u4f55\u7f16\u8f91 php.ini<\/strong><\/p>\n<ul>\n<li>\u5b9a\u4f4d\u548c\u7f16\u8f91\u6b65\u9aa4<\/li>\n<li>\u91cd\u65b0\u542f\u52a8 Web \u670d\u52a1\u5668\u4ee5\u5e94\u7528\u66f4\u6539<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u5e38\u89c1 php.ini \u6307\u4ee4<\/strong><\/p>\n<ul>\n<li>\u57fa\u672c\u8bbe\u7f6e\u53ca\u5176\u7528\u6cd5<\/li>\n<li>\u5e38\u7528\u6307\u4ee4\u793a\u4f8b<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u7ed3\u8bba<\/strong><\/p>\n<ul>\n<li>php.ini \u5728 PHP \u5f00\u53d1\u4e2d\u7684\u4f5c\u7528\u603b\u7ed3<\/li>\n<li>\u7ba1\u7406 php.ini \u914d\u7f6e\u7684\u6700\u4f73\u5b9e\u8df5<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3> php.ini \u603b\u7ed3 <\/h3>\n<p><strong>php.ini<\/strong> \u662f\u4e00\u4e2a\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u4e8e\u63a7\u5236 PHP \u8de8\u73af\u5883\u7684\u884c\u4e3a\u3002\u5b83\u5141\u8bb8\u5f00\u53d1\u4eba\u5458\u81ea\u5b9a\u4e49 PHP \u8bbe\u7f6e\u4ee5\u4f18\u5316\u6027\u80fd\u3001\u589e\u5f3a\u5b89\u5168\u6027\u5e76\u4fc3\u8fdb\u8c03\u8bd5\u3002\u4e3b\u8981\u529f\u80fd\u5305\u62ec\uff1a<\/p>\n<ul>\n<li> <strong>\u9519\u8bef\u5904\u7406\uff1a<\/strong>\u4e3a\u5f00\u53d1\u6216\u751f\u4ea7\u73af\u5883\u914d\u7f6e\u9519\u8bef\u62a5\u544a\uff08display_errors\u3001log_errors\uff09\u3002<\/li>\n<li> <strong>\u8d44\u6e90\u9650\u5236\uff1a<\/strong>\u7ba1\u7406\u5185\u5b58 (memory_limit)\u3001\u6267\u884c\u65f6\u95f4 (max_execution_time) \u548c\u6587\u4ef6\u4e0a\u4f20 (upload_max_filesize)\u3002<\/li>\n<li> <strong>\u5b89\u5168\u8bbe\u7f6e\uff1a<\/strong>\u9650\u5236\u529f\u80fd\uff08disable_functions\uff09\u3001\u6587\u4ef6\u8bbf\u95ee\uff08open_basedir\uff09\u548c\u5916\u90e8\u6587\u4ef6\u8bbf\u95ee\uff08allow_url_fopen\uff09\u3002<\/li>\n<li> <strong>\u4f1a\u8bdd\u7ba1\u7406\uff1a<\/strong> \u8bbe\u7f6e\u8def\u5f84 (session.save_path)\u3001\u8d85\u65f6\u548c cookie \u7b56\u7565\u3002<\/li>\n<li> <strong>\u6027\u80fd\u8c03\u6574\uff1a<\/strong>\u542f\u7528\u7f13\u5b58\uff08opcache.enable\uff09\u5e76\u7ba1\u7406\u8f93\u5165\u9650\u5236\uff08max_input_vars\uff09\u3002<\/li>\n<\/ul>\n<p><strong>\u4f4d\u7f6e\uff1a<\/strong>\u901a\u5e38\u4f4d\u4e8e PHP \u7684\u5b89\u88c5\u76ee\u5f55\u4e2d\uff08\u4f8b\u5982\uff0cLinux \u4e0a\u7684 \/etc\/php \u6216 Windows \u4e0a\u7684 C:xamppphp\uff09\u3002<\/p>\n<p><strong>\u7f16\u8f91\uff1a<\/strong>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u4fee\u6539\u6587\u4ef6\uff0c\u4fdd\u5b58\u66f4\u6539\uff0c\u7136\u540e\u91cd\u65b0\u542f\u52a8\u7f51\u7edc\u670d\u52a1\u5668\u4ee5\u5e94\u7528\u3002<\/p>\n<p>\u4e86\u89e3\u5e76\u914d\u7f6e php.ini \u53ef\u786e\u4fdd\u9ad8\u6548\u3001\u5b89\u5168\u3001\u7a33\u5b9a\u7684 PHP \u5e94\u7528\u90e8\u7f72\u3002<\/p>\n<p><strong>php.ini<\/strong> \u6587\u4ef6\u5bf9\u4e8e PHP \u5f00\u53d1\u6765\u8bf4\u662f\u4e0d\u53ef\u6216\u7f3a\u7684\uff0c\u5b83\u662f\u81ea\u5b9a\u4e49 PHP \u884c\u4e3a\u4ee5\u6ee1\u8db3\u4e0d\u540c\u5e94\u7528\u7a0b\u5e8f\u9700\u6c42\u7684\u57fa\u7840\u3002\u5b83\u4f7f\u5f00\u53d1\u4eba\u5458\u80fd\u591f\u4f18\u5316\u6027\u80fd\u3001\u589e\u5f3a\u5b89\u5168\u6027\u5e76\u6709\u6548\u5730\u89e3\u51b3\u95ee\u9898\u3002\u65e0\u8bba\u662f\u5c0f\u578b\u9879\u76ee\u8fd8\u662f\u5927\u578b\u5e94\u7528\u7a0b\u5e8f\uff0c\u638c\u63e1 php.ini \u90fd\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u4eba\u5458\u6784\u5efa\u5065\u58ee\u3001\u5b89\u5168\u4e14\u9ad8\u6548\u7684 PHP \u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<p>\u5982\u679c\u60a8\u60f3\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u70b9\u51fb\u6b64\u5904\u3002<\/p>\n<p>\u901a\u8fc7 :@ LinkedIn \u4e0e\u6211\u8054\u7cfb\u5e76\u67e5\u770b\u6211\u7684\u4f5c\u54c1\u96c6\u3002<\/p>\n<p>\u8bf7\u7ed9\u6211\u7684 GitHub \u9879\u76ee\u4e00\u9897\u661f \u2b50\ufe0f<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fphpini \u6982\u8ff0\uff1a\u63d0\u9ad8\u6027\u80fd\u3001\u5b89\u5168\u6027\u548c\u7075\u6d3b\u6027\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>\u76ee\u5f55 php.ini\u7b80\u4ecb \u4ec0\u4e48\u662f php.ini\uff1f \u5b83\u5f88\u91cd\u8981\uff1f php.ini \u7684\u5173\u952e\u65b9\u9762 \u9519\u8bef\u5904\u7406 \u8d44\u6e90\u9650\u5236 \u5b89\u5168\u8bbe\u7f6e \u4f1a\u8bdd\u7ba1\u7406 \u65f6\u533a\u914d\u7f6e \u6587\u4ef6\u4e0a\u4f20\u9650\u5236 php.ini \u5982\u4f55\u5f71\u54cd PHP \u6027\u80fd \u5185\u5b58\u548c\u6267\u884c\u9650\u5236 \u7f13\u5b58\u673a\u5236 \u5f00\u53d1\u4e0e\u751f\u4ea7\u4e2d\u7684\u9519\u8bef\u5904\u7406 \u4e3a\u4ec0\u4e48 php.ini \u5bf9\u4e8e PHP \u5f00\u53d1\u5f88\u91cd\u8981 \u7acb\u5373\u5b66\u4e60\u201c\u201d\uff1b \u81ea\u5b9a\u4e49 PHP \u884c\u4e3a \u589e\u5f3a\u5b89\u5168\u6027 \u63d0\u9ad8\u5e94\u7528\u7a0b\u5e8f\u6027\u80fd \u7b80\u5316\u6545\u969c\u6392\u9664 php.ini \u7684\u4f4d\u7f6e Windows\u3001Linux\/Unix \u548c Web \u5806\u6808\u4e0a\u7684\u5e38\u89c1\u4f4d\u7f6e\uff08\u4f8b\u5982 XAMPP\u3001WAMP\u3001MAMP\uff09 \u5982\u4f55\u7f16\u8f91 php.ini \u5b9a\u4f4d\u548c\u7f16\u8f91\u6b65\u9aa4 \u91cd\u65b0\u542f\u52a8 Web \u670d\u52a1\u5668\u4ee5\u5e94\u7528\u66f4\u6539 \u5e38\u89c1 php.ini \u6307\u4ee4 \u57fa\u672c\u8bbe\u7f6e\u53ca\u5176\u7528\u6cd5 \u5e38\u7528\u6307\u4ee4\u793a\u4f8b \u7ed3\u8bba php.ini \u5728 PHP \u5f00\u53d1\u4e2d\u7684\u4f5c\u7528\u603b\u7ed3 [&hellip;]<\/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-28430","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28430","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=28430"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/28430\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=28430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=28430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=28430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}