{"id":404,"date":"2025-06-10T19:56:21","date_gmt":"2025-06-10T11:56:21","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/php\/php-application-manual\/jcyy\/404.html"},"modified":"2025-06-10T19:56:21","modified_gmt":"2025-06-10T11:56:21","slug":"php%ef%bc%9aphp-ini-%e7%9a%84%e6%9c%80%e4%bd%b3%e9%85%8d%e7%bd%ae","status":"publish","type":"my1js","link":"https:\/\/www.zhaozhao123.cn\/php\/my1js\/404.html","title":{"rendered":"PHP\uff1aphp.ini \u7684\u6700\u4f73\u914d\u7f6e"},"content":{"rendered":"<p><body><\/p>\n<h2>&#20171;&#32461;<\/h2>\n<p>&#20248;&#21270;&#24744;&#30340;<code>php.ini<\/code>&#25991;&#20214;&#23545;&#20110;&#25552;&#39640;PHP&#24212;&#29992;&#31243;&#24207;&#30340;&#24615;&#33021;&#21644;&#23433;&#20840;&#24615;&#33267;&#20851;&#37325;&#35201;&#12290;&#26412;&#25945;&#31243;&#23558;&#25351;&#23548;&#24744;&#37197;&#32622;&#30340;&#26368;&#20339;&#23454;&#36341;&#12290;<code>php.ini<\/code>PHP&#30340;&#20027;&#37197;&#32622;&#25991;&#20214;&#12290;<\/p>\n<h2>&#35774;&#32622;PHP&#25351;&#20196;&#12290;<\/h2>\n<p>&#25351;&#20196;&#22312;&#8230;<code>php.ini<\/code>&#25991;&#20214;&#25511;&#21046;&#22914;&#20309;&#24433;&#21709;PHP&#30340;&#34892;&#20026;&#12290;&#35753;&#25105;&#20204;&#30475;&#30475;&#19968;&#20123;&#20851;&#38190;&#35774;&#32622;&#12290;<\/p>\n<pre><code>error_reporting = E_ALL<\/code><\/pre>\n<p>&#20351;&#29992;&#12290;<code>E_ALL<\/code>&#22312;&#24320;&#21457;&#36807;&#31243;&#20013;&#65292;&#25512;&#33616;&#25429;&#33719;&#25152;&#26377;&#28508;&#22312;&#38169;&#35823;&#12290;<\/p>\n<pre><code>display_errors = On\n\nlog_errors = On\nerror_log = \"\/var\/log\/php_errors.log\"<\/code><\/pre>\n<p>&#36825;&#31181;&#32452;&#21512;&#30830;&#20445;&#24320;&#21457;&#20154;&#21592;&#30475;&#21040;&#38169;&#35823;&#26102;&#65292;&#36825;&#20123;&#38169;&#35823;&#20063;&#20250;&#34987;&#35760;&#24405;&#19979;&#26469;&#20379;&#26085;&#21518;&#23457;&#26597;&#12290;&#22312;&#29983;&#20135;&#29615;&#22659;&#20013;&#65292;&#35774;&#32622;&#20026;&#21551;&#29992;&#12290;<code>display_errors<\/code>&#27809;&#26377;&#25910;&#21040;&#24744;&#30340;&#38382;&#39064;&#65292;&#35831;&#38382;&#26377;&#20160;&#20040;&#25105;&#21487;&#20197;&#24110;&#21161;&#30340;&#21527;&#65311;<code>Off<\/code>&#22909;&#30340;&#65292;&#35831;&#25552;&#20379;&#38656;&#35201;&#32763;&#35793;&#30340;&#20869;&#23481;&#12290;<\/p>\n<h2>&#20869;&#23384;&#21644;&#25191;&#34892;&#38480;&#21046;<\/h2>\n<p>&#31649;&#29702;&#20869;&#23384;&#21644;&#25191;&#34892;&#26102;&#38388;&#21487;&#20197;&#38450;&#27490;&#33050;&#26412;&#32791;&#23613;&#36164;&#28304;&#65306;<\/p>\n<pre><code>memory_limit = 128M\n\nmax_execution_time = 30<\/code><\/pre>\n<p>&#36825;&#20123;&#38480;&#21046;&#20445;&#25252;&#24744;&#30340;&#26381;&#21153;&#22120;&#20813;&#21463;&#20351;&#29992;&#36807;&#22810;&#20869;&#23384;&#25110;&#25191;&#34892;&#26102;&#38388;&#36807;&#38271;&#30340;&#33050;&#26412;&#30340;&#24433;&#21709;&#12290;<\/p>\n<h2>&#25991;&#20214;&#19978;&#20256;<\/h2>\n<p>&#25511;&#21046;&#25991;&#20214;&#19978;&#20256;&#30340;&#22823;&#23567;&#21644;&#22788;&#29702;&#65306;<\/p>\n<pre><code>file_uploads = On\n\nupload_max_filesize = 20M\n\npost_max_size = 25M<\/code><\/pre>\n<p>&#20445;&#25345;&#21543;&#12290;<code>post_max_size<\/code>&#26356;&#22823;&#19968;&#20123;<code>upload_max_filesize<\/code>&#20026;&#20102;&#22788;&#29702;&#39069;&#22806;&#30340;POST&#25968;&#25454;&#12290;<\/p>\n<h2>&#24615;&#33021;&#35843;&#25972;<\/h2>\n<p>&#20351;&#29992;opcode&#32531;&#23384;&#65292;&#20363;&#22914;&#19982;OPcache&#32467;&#21512;&#65306;<\/p>\n<pre><code>opcache.enable=1\n\nopcache.memory_consumption=128\n\nopcache.max_accelerated_files=10000\n\nopcache.validate_timestamps=2<\/code><\/pre>\n<p>&#26681;&#25454;&#26381;&#21153;&#22120;&#36164;&#28304;&#21644;&#24212;&#29992;&#31243;&#24207;&#38656;&#27714;&#35843;&#25972;&#36825;&#20123;&#20540;&#12290;<\/p>\n<h2>&#20250;&#35805;&#22788;&#29702;<\/h2>\n<p>&#27491;&#30830;&#37197;&#32622;&#20250;&#35805;&#21487;&#20197;&#22686;&#24378;&#23433;&#20840;&#24615;&#65306;<\/p>\n<pre><code>session.cookie_secure = On\n\nsession.use_only_cookies = On\n\nsession.cookie_httponly = On\n\nsession.sid_length = 40<\/code><\/pre>\n<p>&#36825;&#20123;&#35774;&#32622;&#26377;&#21161;&#20110;&#20445;&#25252;&#20250;&#35805;cookie&#20813;&#21463;&#21163;&#25345;&#21644;XSS&#25915;&#20987;&#12290;<\/p>\n<h2>&#26085;&#26399;&#21644;&#26102;&#38388;<\/h2>\n<p>&#35831;&#30830;&#20445;&#24744;&#30340;&#33050;&#26412;&#20351;&#29992;&#27491;&#30830;&#30340;&#26102;&#21306;&#65306;<\/p>\n<pre><code>date.timezone = \"Europe\/Lisbon\"<\/code><\/pre>\n<p>&#36873;&#25321;&#36866;&#21512;&#24744;&#26381;&#21153;&#22120;&#20301;&#32622;&#30340;&#26102;&#38388;&#21306;&#12290;<\/p>\n<h2>&#25968;&#25454;&#24211;&#36830;&#25509;<\/h2>\n<p>&#35843;&#25972;PHP&#30340;PDO&#21644;MySQLi&#35774;&#32622;&#21487;&#20197;&#25552;&#39640;&#19982;&#25968;&#25454;&#24211;&#30340;&#20132;&#20114;&#24615;&#33021;&#65306;<\/p>\n<pre><code>pdo_mysql.default_socket=\"\/var\/run\/mysqld\/mysqld.sock\"\n\nmysqli.reconnect = On<\/code><\/pre>\n<p>&#35831;&#27880;&#24847;&#12290;<code>default_socket<\/code>&#25351;&#20196;&#65292;&#21551;&#29992;<code>mysqli.reconnect<\/code>&#23545;&#20110;&#25345;&#20037;&#30340;&#25968;&#25454;&#24211;&#36830;&#25509;&#12290;<\/p>\n<h2>&#29983;&#20135;&#29615;&#22659;&#30340;&#38169;&#35823;&#22788;&#29702;<\/h2>\n<p>&#22312;&#29983;&#20135;&#29615;&#22659;&#20013;&#65292;&#21152;&#24378;&#23433;&#20840;&#24182;&#20943;&#23569;&#20887;&#20313;&#20449;&#24687;&#65306;<\/p>\n<pre><code>display_errors = Off\n\nexpose_php = Off\n\nlog_errors = On<\/code><\/pre>\n<p>&#36825;&#20250;&#38544;&#34255;PHP&#38169;&#35823;&#65292;&#20943;&#23569;&#26381;&#21153;&#22120;&#26292;&#38706;&#30340;&#20449;&#24687;&#12290;<\/p>\n<h2>&#22788;&#29702;&#36335;&#24452;&#21644;&#30446;&#24405;<\/h2>\n<p>&#37197;&#32622;&#21253;&#21547;&#36335;&#24452;&#21487;&#20197;&#26368;&#23567;&#21270;&#25991;&#20214;&#31995;&#32479;&#24320;&#38144;&#65306;<\/p>\n<pre><code>include_path = \".:\/usr\/share\/php\"<\/code><\/pre>\n<p>&#26681;&#25454;&#39057;&#32321;&#35775;&#38382;&#30340;&#30446;&#24405;&#33258;&#23450;&#20041;&#36335;&#24452;&#65292;&#20197;&#21152;&#24555;&#25991;&#20214;&#21253;&#21547;&#30340;&#36895;&#24230;&#12290;<\/p>\n<h2>&#32467;&#35770;&#12290;<\/h2>\n<p>&#26377;&#25928;&#22320;&#37197;&#32622;<code>php.ini<\/code>&#36825;&#20123;&#35774;&#32622;&#21487;&#20197;&#26174;&#33879;&#25552;&#39640;PHP&#24212;&#29992;&#31243;&#24207;&#30340;&#24615;&#33021;&#21644;&#23433;&#20840;&#24615;&#12290;&#19978;&#36848;&#25351;&#31034;&#25552;&#20379;&#20102;&#33391;&#22909;&#30340;&#36215;&#28857;&#65292;&#20294;&#35831;&#26681;&#25454;&#24744;&#30340;Web&#24212;&#29992;&#21450;&#20854;&#26381;&#21153;&#22120;&#29615;&#22659;&#30340;&#20855;&#20307;&#38656;&#27714;&#36827;&#34892;&#35843;&#25972;&#12290;<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#20171;&#32461; &#20248;&#21270;&#24744;&#30340;php.ini&#25991;&#20214;&#23545;&#20110;&#25552;&#39640;PHP&#24212;&#29992;&#31243;&#24207;&#30340;&#24615;&#038;#330..<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false},"tags":[],"my1js2nav":[38],"tuisongtax":[],"class_list":["post-404","my1js","type-my1js","status-publish","hentry","my1js2nav-jcyy"],"acf":{"qian_art_seotitle":"","qian_art_seotitle_source":{"label":"SEO\u6807\u9898","type":"text","formatted_value":""},"qian_art_seokws":"","qian_art_seokws_source":{"label":"SEO\u5173\u952e\u8bcd","type":"text","formatted_value":""},"qian_art_stzhong":"","qian_art_stzhong_source":{"label":"\u4e2d | \u77ed\u6807\u9898","type":"text","formatted_value":""}},"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js\/404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/types\/my1js"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/media?parent=404"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tags?post=404"},{"taxonomy":"my1js2nav","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js2nav?post=404"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tuisongtax?post=404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}