{"id":27435,"date":"2024-11-24T19:25:54","date_gmt":"2024-11-24T11:25:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/?p=27435"},"modified":"2024-11-24T19:25:54","modified_gmt":"2024-11-24T11:25:54","slug":"php%e4%b8%ad%e7%9a%84%e9%94%99%e8%af%af%e6%8f%90%e7%a4%ba","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27435\/","title":{"rendered":"PHP\u4e2d\u7684\u9519\u8bef\u63d0\u793a"},"content":{"rendered":"<p><strong>1\u3001\u6253\u5f00\uff0f\u5173\u95ed\u9519\u8bef\u63d0\u793a\u7684\u65b9\u6cd5\u5305\u62ec\uff1aa\u3001\u66f4\u6539php.ini\u6587\u4ef6 b\u3001\u4f7f\u7528ini_set\u8bbe\u7f6e\uff0c\u8be6\u89c1\u4e0b\u8868<\/strong><\/p>\n<p>&nbsp;<\/p>\n<table cellspacing=\"5\" cellpadding=\"5\">\n<tbody>\n<tr>\n<td width=\"15%\">\u53d8\u91cf<\/td>\n<td width=\"15%\">php.ini<br \/>\n\u8bed\u6cd5\uff1a\u53d8\u91cf=\u503c<\/td>\n<td width=\"20%\">ini_set<br \/>\n\u8bed\u6cd5\uff1aini_set(\u201c\u53d8\u91cf\u201d,\u503c)<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td>display_errors<\/td>\n<td>On \/ Off<\/td>\n<td>\u00a0on \/ off\uff0ctrue \/ false , 1\/ 0<\/td>\n<td>\u5f00\u542f\/\u5173\u95ed\u663e\u793a\u9519\u8bef\u63d0\u793a\uff0c\u4f46\u4e0d\u5f71\u54cd\u9519\u8bef\u5199\u5165\u65e5\u5fd7\u3002\u5373display_errors\u5173\u95ed\uff0c\u9519\u8bef\u4fe1\u606f\u53ef\u4ee5\u5199\u5165\u65e5\u5fd7\uff0c\u4ec5\u4e0d\u5728\u5ba2\u6237\u7aef\u663e\u793a\u800c\u5df2\u3002<\/td>\n<\/tr>\n<tr>\n<td>error_reporting<\/td>\n<td>\u89c1\u4e0b\u8868<\/td>\n<td>\u89c1\u4e0b\u8868<\/td>\n<td>\u663e\u793a\u9519\u8bef\u7ea7\u522b<\/td>\n<\/tr>\n<tr>\n<td>display_startup_errors<\/td>\n<td>On \/ Off<\/td>\n<td>on \/ off\uff0ctrue \/ false , 1\/ 0<\/td>\n<td>\u5373\u4f7f display_errors \u8bbe\u7f6e\u4e3a\u5f00\u542f, PHP \u542f\u52a8\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u4fe1\u606f\u4e5f\u4e0d\u4f1a\u88ab\u663e\u793a\u3002\u5f3a\u70c8\u5efa\u8bae\u9664\u4e86\u8c03\u8bd5\u76ee\u7684\u4ee5\u5916\uff0c\u5c06 display_startup_errors \u8bbe\u7f6e\u4e3a\u5173\u95ed\u3002\u548cE_CORE_ERROR\u3001E_CORE_WARNING\u6709\u5173<\/td>\n<\/tr>\n<tr>\n<td>log_errors<\/td>\n<td>On \/ Off<\/td>\n<td>\uff0d<\/td>\n<td>\u8bbe\u7f6e\u662f\u5426\u5c06\u811a\u672c\u8fd0\u884c\u7684\u9519\u8bef\u4fe1\u606f\u8bb0\u5f55\u5230\u670d\u52a1\u5668\u9519\u8bef\u65e5\u5fd7\u6216\u8005error_log\u4e4b\u4e2d\u3002\u6ce8\u610f\uff0c\u8fd9\u662f\u4e0e\u670d\u52a1\u5668\u76f8\u5173\u7684\u7279\u5b9a\u914d\u7f6e\u9879\u3002<br \/>\n\u6ce8\u610f\uff1a\u5982\u679c\u8be5\u9009\u9879\u5173\u95ed\uff0c\u5219nginx\u90fd\u65e0\u6cd5\u83b7\u53d6\u5230\u9519\u8bef\u65e5\u5fd7<\/td>\n<\/tr>\n<tr>\n<td>error_log<\/td>\n<td>\u65e5\u5fd7\u8def\u5f84<\/td>\n<td>\uff0d<\/td>\n<td>\u5982\u679c\u5728php.ini\u4e2d\u6253\u5f00\u8be5\u65e5\u5fd7\u8def\u5f84\uff0c\u5219\u9519\u8bef\u4fe1\u606f\u5199\u5165\u8be5\u8def\u5f84\uff0c\u800cnginx\u5219\u65e0\u6cd5\u83b7\u53d6\u5230\u9519\u8bef\u4fe1\u606f\u3002<\/td>\n<\/tr>\n<tr>\n<td>log_errors_max_len<\/td>\n<td>int(\u9ed8\u8ba4 1024)<\/td>\n<td>\uff0d<\/td>\n<td>\u8bbe\u7f6e log_errors \u7684\u6700\u5927\u5b57\u8282\u6570\uff0c\u4ec5\u5bf9\u9519\u8bef\u6d88\u606f\u5199\u5165php\u65e5\u5fd7\u8d77\u4f5c\u7528\uff0c\u5bf9\u5199\u5165nginx\u7684\u9519\u8bef\u6d88\u606f\u4e0d\u8d77\u4f5c\u7528.\u8be5\u957f\u5ea6\u8bbe\u7f6e\u5bf9\u8bb0\u5f55\u7684\u9519\u8bef\uff0c\u663e\u793a\u7684\u9519\u8bef\uff0c\u4ee5\u53ca $php_errormsg\u90fd\u4f1a\u6709\u9650\u5236\u4f5c\u7528\u3002<\/td>\n<\/tr>\n<tr>\n<td>ignore_repeated_errors<\/td>\n<td>On \/ Off\uff0c\u9ed8\u8ba4off<\/td>\n<td>&#8211;<\/td>\n<td>\u4e0d\u8bb0\u5f55\u91cd\u590d\u7684\u4fe1\u606f\u3002\u91cd\u590d\u7684\u9519\u8bef\u5fc5\u987b\u51fa\u73b0\u5728\u540c\u4e00\u4e2a\u6587\u4ef6\u4e2d\u7684\u540c\u4e00\u884c\u4ee3\u7801\u4e0a\uff0c\u9664\u975e ignore_repeated_source \u8bbe\u7f6e\u4e3atrue\u3002<\/td>\n<\/tr>\n<tr>\n<td>ignore_repeated_source<\/td>\n<td>On \/ Off\uff0c\u9ed8\u8ba4off<\/td>\n<td>&#8211;<\/td>\n<td>\u5ffd\u7565\u91cd\u590d\u6d88\u606f\u65f6\uff0c\u4e5f\u5ffd\u7565\u6d88\u606f\u7684\u6765\u6e90\u3002\u5f53\u8be5\u8bbe\u7f6e\u5f00\u542f\u65f6\uff0c\u91cd\u590d\u4fe1\u606f\u5c06\u4e0d\u4f1a\u8bb0\u5f55\u5b83\u662f\u7531\u4e0d\u540c\u7684\u6587\u4ef6\u8fd8\u662f\u4e0d\u540c\u7684\u6e90\u4ee3\u7801\u884c\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>report_memleaks<\/td>\n<td>On \/ Off\uff0c\u9ed8\u8ba4on<\/td>\n<td>&#8211;<\/td>\n<td>\u5982\u679c\u8fd9\u4e2a\u53c2\u6570\u8bbe\u7f6e\u4e3aOff\uff0c\u5219\u5185\u5b58\u6cc4\u9732\u4fe1\u606f\u4e0d\u4f1a\u663e\u793a (\u5728 stdout \u6216\u8005\u65e5\u5fd7\u4e2d)\u3002\u8fd9\u53ea\u5bf9\u8c03\u8bd5\u7f16\u8bd1\u6709\u6548\uff0c\u800c\u4e14\u9700\u8981 error_reporting \u5305\u542b\u4e86 E_WARNING \u624d\u4f1a\u8d77\u4f5c\u7528.<\/td>\n<\/tr>\n<tr>\n<td>track_errors<\/td>\n<td>On \/ Off\uff0c\u9ed8\u8ba4off<\/td>\n<td>&#8211;<\/td>\n<td>\u5982\u679c\u5f00\u542f\uff0c\u6700\u540e\u7684\u4e00\u4e2a\u9519\u8bef\u5c06\u6c38\u8fdc\u5b58\u5728\u4e8e\u53d8\u91cf $php_errormsg \u4e2d<\/td>\n<\/tr>\n<tr>\n<td>$php_errormsg<\/td>\n<td>&#8211;<\/td>\n<td>&#8211;<\/td>\n<td>$php_errormsg \u53d8\u91cf\u5305\u542b\u7531 PHP \u751f\u6210\u7684\u6700\u65b0\u9519\u8bef\u4fe1\u606f\u3002\u8fd9\u4e2a\u53d8\u91cf\u53ea\u5728\u9519\u8bef\u53d1\u751f\u7684\u4f5c\u7528\u57df\u5185\u53ef\u7528\uff0c\u5e76\u4e14\u8981\u6c42 track_errors \u914d\u7f6e\u9879\u662f\u5f00\u542f\u7684\uff08\u9ed8\u8ba4\u662f\u5173\u95ed\u7684\uff09\u3002<\/td>\n<\/tr>\n<tr>\n<td>html_errors<\/td>\n<td>On \/ Off\uff0c\u9ed8\u8ba4on<\/td>\n<td>&#8211;<\/td>\n<td>\u5728\u9519\u8bef\u4fe1\u606f\u4e2d\u5173\u95edHTML\u6807\u7b7e\u3002\u8fd9\u79cd\u65b0\u7684HTML\u683c\u5f0f\u7684\u9519\u8bef\u4fe1\u606f\u662f\u53ef\u4ee5\u70b9\u51fb\uff0c\u5b83\u5f15\u5bfc\u7528\u6237\u524d\u5f80\u63cf\u8ff0\u8be5\u9519\u8bef\u6216\u8005\u5bfc\u81f4\u8be5\u9519\u8bef\u53d1\u751f\u7684\u51fd\u6570\u7684\u53c2\u8003\u4fe1\u606f\u9875\u9762\u3002<\/td>\n<\/tr>\n<tr>\n<td>xmlrpc_errors<\/td>\n<td>1 \/ 0 ,\u9ed8\u8ba40<\/td>\n<td>&#8211;<\/td>\n<td>\u5173\u95ed\u6b63\u5e38\u7684\u9519\u8bef\u62a5\u544a\uff0c\u5e76\u5c06\u9519\u8bef\u7684\u683c\u5f0f\u8bbe\u7f6e\u4e3aXML-RPC\u9519\u8bef\u4fe1\u606f\u7684\u683c\u5f0f<\/td>\n<\/tr>\n<tr>\n<td>xmlrpc_error_number<\/td>\n<td>int\uff0c\u9ed8\u8ba40<\/td>\n<td>\uff0d<\/td>\n<td>\u7528\u4f5c XML-RPC faultCode \u5143\u7d20\u7684\u503c<\/td>\n<\/tr>\n<tr>\n<td>error_prepend_string<\/td>\n<td>string<\/td>\n<td>&#8211;<\/td>\n<td>\u9519\u8bef\u4fe1\u606f\u4e4b\u524d\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u4e0d\u5199\u5165\u65e5\u5fd7\uff0c\u4ec5\u5728\u5ba2\u6237\u7aef\u5c55\u793a\u3002<\/td>\n<\/tr>\n<tr>\n<td>error_append_string<\/td>\n<td>string<\/td>\n<td>&#8211;<\/td>\n<td>\u9519\u8bef\u4fe1\u606f\u4e4b\u540e\u8f93\u51fa\u7684\u5185\u5bb9\uff0c\u4e0d\u5199\u5165\u65e5\u5fd7\uff0c\u4ec5\u5728\u5ba2\u6237\u7aef\u5c55\u793a\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>2\u3001error_reporting\u7684\u8bbe\u7f6e<\/strong><\/p>\n<p>\u8bbe\u7f6e\u65b9\u6cd5\u5305\u62ec\uff1aa\u3001\u5728php.ini\u4e2d\u8bbe\u7f6e\u3002b\u3001\u5728PHP\u4e2d\u4f7f\u7528error_reporting()\u51fd\u6570 c \u3001\u5728PHP\u4e2d\u4f7f\u7528ini_set\u51fd\u6570<\/p>\n<p>\u8bbe\u7f6e\u65b9\u6cd5\u5305\u62ec\uff1aa\u3001\u4f7f\u7528int\u503c\u8bbe\u7f6e\u3002b\u3001\u4f7f\u7528\u5e38\u91cf\u8bbe\u7f6e\u3002<\/p>\n<pre>\u4e3e\u4f8b\u8bf4\u660e\uff1a\r\nerror_reporting=8\r\nerror_reporting=7 \uff087\u76f8\u5f53\u4e8e1+2+4\uff09\r\nerror_reporting = E_ALL &amp; ~E_DEPRECATED &amp; ~E_STRICT\r\n\r\nerror_reporting(0) \/\/\u5173\u95ed\u9519\u8bef\r\nerror_reporting(E_ALL) \/\/E_STRICT\u51fa\u5916\u7684\u6240\u6709\u9519\u8bef\u548c\u8b66\u544a\u4fe1\u606f\r\nerror_reporting(-1) \/\/\u6240\u6709\u9519\u8bef\r\nini_set(\"error_reporting\",-1)\r\nini_set(\"error_reporting\",E_WARNING)<\/pre>\n<p>\u9519\u8bef\u7ea7\u522b<\/p>\n<table cellspacing=\"5\" cellpadding=\"5\">\n<tbody>\n<tr>\n<td>\u503c<\/td>\n<td>\u5e38\u91cf<\/td>\n<td>\u8bf4\u660e<\/td>\n<\/tr>\n<tr>\n<td width=\"10%\">1<\/td>\n<td width=\"25%\">E_ERROR<\/td>\n<td>\u81f4\u547d\u7684\u8fd0\u884c\u65f6\u9519\u8bef\u3002\u8fd9\u7c7b\u9519\u8bef\u4e00\u822c\u662f\u4e0d\u53ef\u6062\u590d\u7684\u60c5\u51b5\uff0c\u4f8b\u5982\u5185\u5b58\u5206\u914d\u5bfc\u81f4\u7684\u95ee\u9898\u3002\u540e\u679c\u662f\u5bfc\u81f4\u811a\u672c\u7ec8\u6b62\u4e0d\u518d\u7ee7\u7eed\u8fd0\u884c\u3002<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>E_WARNING<\/td>\n<td>\u8fd0\u884c\u65f6\u8b66\u544a (\u975e\u81f4\u547d\u9519\u8bef)\u3002\u4ec5\u7ed9\u51fa\u63d0\u793a\u4fe1\u606f\uff0c\u4f46\u662f\u811a\u672c\u4e0d\u4f1a\u7ec8\u6b62\u8fd0\u884c\u3002<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>E_PARSE<\/td>\n<td>\u7f16\u8bd1\u65f6\u8bed\u6cd5\u89e3\u6790\u9519\u8bef\u3002\u89e3\u6790\u9519\u8bef\u4ec5\u4ec5\u7531\u5206\u6790\u5668\u4ea7\u751f\u3002<\/td>\n<\/tr>\n<tr>\n<td>8<\/td>\n<td>E_NOTICE<\/td>\n<td>\u8fd0\u884c\u65f6\u901a\u77e5\u3002\u8868\u793a\u811a\u672c\u9047\u5230\u53ef\u80fd\u4f1a\u8868\u73b0\u4e3a\u9519\u8bef\u7684\u60c5\u51b5\uff0c\u4f46\u662f\u5728\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u7684\u811a\u672c\u91cc\u9762\u4e5f\u53ef\u80fd\u4f1a\u6709\u7c7b\u4f3c\u7684\u901a\u77e5\u3002<\/td>\n<\/tr>\n<tr>\n<td>16<\/td>\n<td>E_CORE_ERROR<\/td>\n<td>\u5728PHP\u521d\u59cb\u5316\u542f\u52a8\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u81f4\u547d\u9519\u8bef\u3002\u8be5\u9519\u8bef\u7c7b\u4f3c E_ERROR\uff0c\u4f46\u662f\u662f\u7531PHP\u5f15\u64ce\u6838\u5fc3\u4ea7\u751f\u7684\u3002display_startup_errors\u5f00\u542f\u65f6\uff0c\u624d\u4f1a\u663e\u793a\uff0c\u548cdisplay_errors\u8bbe\u7f6e\u65e0\u5173<\/td>\n<\/tr>\n<tr>\n<td>32<\/td>\n<td>E_CORE_WARNING<\/td>\n<td>\u5728PHP\u521d\u59cb\u5316\u542f\u52a8\u8fc7\u7a0b\u4e2d\u53d1\u751f\u7684\u8b66\u544a (\u975e\u81f4\u547d\u9519\u8bef) \u3002\u7c7b\u4f3c E_WARNING\uff0c\u4f46\u662f\u662f\u7531PHP\u5f15\u64ce\u6838\u5fc3\u4ea7\u751f\u7684\u3002display_startup_errors\u5f00\u542f\u65f6\uff0c\u624d\u4f1a\u663e\u793a\uff0c\u548cdisplay_errors\u8bbe\u7f6e\u65e0\u5173<\/td>\n<\/tr>\n<tr>\n<td>64<\/td>\n<td>E_COMPILE_ERROR<\/td>\n<td>\u81f4\u547d\u7f16\u8bd1\u65f6\u9519\u8bef\u3002\u7c7b\u4f3cE_ERROR, \u4f46\u662f\u662f\u7531Zend\u811a\u672c\u5f15\u64ce\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>128<\/td>\n<td>E_COMPILE_WARNING<\/td>\n<td>\u7f16\u8bd1\u65f6\u8b66\u544a (\u975e\u81f4\u547d\u9519\u8bef)\u3002\u7c7b\u4f3c E_WARNING\uff0c\u4f46\u662f\u662f\u7531Zend\u811a\u672c\u5f15\u64ce\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>256<\/td>\n<td>E_USER_ERROR<\/td>\n<td>\u7528\u6237\u4ea7\u751f\u7684\u9519\u8bef\u4fe1\u606f\u3002\u7c7b\u4f3c E_ERROR, \u4f46\u662f\u662f\u7531\u7528\u6237\u81ea\u5df1\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528PHP\u51fd\u6570\u00a0trigger_error()\u6765\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>512<\/td>\n<td>E_USER_WARNING<\/td>\n<td>\u7528\u6237\u4ea7\u751f\u7684\u8b66\u544a\u4fe1\u606f\u3002\u7c7b\u4f3c E_WARNING, \u4f46\u662f\u662f\u7531\u7528\u6237\u81ea\u5df1\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528PHP\u51fd\u6570\u00a0trigger_error()\u6765\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>1024<\/td>\n<td>E_USER_NOTICE<\/td>\n<td>\u7528\u6237\u4ea7\u751f\u7684\u901a\u77e5\u4fe1\u606f\u3002\u7c7b\u4f3c E_NOTICE, \u4f46\u662f\u662f\u7531\u7528\u6237\u81ea\u5df1\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528PHP\u51fd\u6570\u00a0trigger_error()\u6765\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>2048<\/td>\n<td>E_STRICT<\/td>\n<td>\u542f\u7528 PHP \u5bf9\u4ee3\u7801\u7684\u4fee\u6539\u5efa\u8bae\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u5177\u6709\u6700\u4f73\u7684\u4e92\u64cd\u4f5c\u6027\u548c\u5411\u524d\u517c\u5bb9\u6027\u3002<\/td>\n<\/tr>\n<tr>\n<td>4096<\/td>\n<td>E_RECOVERABLE_ERROR<\/td>\n<td>\u53ef\u88ab\u6355\u6349\u7684\u81f4\u547d\u9519\u8bef\u3002 \u5b83\u8868\u793a\u53d1\u751f\u4e86\u4e00\u4e2a\u53ef\u80fd\u975e\u5e38\u5371\u9669\u7684\u9519\u8bef\uff0c\u4f46\u662f\u8fd8\u6ca1\u6709\u5bfc\u81f4PHP\u5f15\u64ce\u5904\u4e8e\u4e0d\u7a33\u5b9a\u7684\u72b6\u6001\u3002 \u5982\u679c\u8be5\u9519\u8bef\u6ca1\u6709\u88ab\u7528\u6237\u81ea\u5b9a\u4e49\u53e5\u67c4\u6355\u83b7 (\u53c2\u89c1\u00a0set_error_handler())\uff0c\u5c06\u6210\u4e3a\u4e00\u4e2a E_ERROR\u3000\u4ece\u800c\u811a\u672c\u4f1a\u7ec8\u6b62\u8fd0\u884c<\/td>\n<\/tr>\n<tr>\n<td>8192<\/td>\n<td>E_DEPRECATED<\/td>\n<td>\u8fd0\u884c\u65f6\u901a\u77e5\u3002\u542f\u7528\u540e\u5c06\u4f1a\u5bf9\u5728\u672a\u6765\u7248\u672c\u4e2d\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u5de5\u4f5c\u7684\u4ee3\u7801\u7ed9\u51fa\u8b66\u544a\u3002<\/td>\n<\/tr>\n<tr>\n<td>16384<\/td>\n<td>E_USER_DEPRECATED<\/td>\n<td>\u7528\u6237\u4ea7\u5c11\u7684\u8b66\u544a\u4fe1\u606f\u3002 \u7c7b\u4f3c E_DEPRECATED, \u4f46\u662f\u662f\u7531\u7528\u6237\u81ea\u5df1\u5728\u4ee3\u7801\u4e2d\u4f7f\u7528PHP\u51fd\u6570\u00a0trigger_error()\u6765\u4ea7\u751f\u7684\u3002<\/td>\n<\/tr>\n<tr>\n<td>30719<\/td>\n<td>E_ALL<\/td>\n<td>E_STRICT\u9664\u5916\u7684\u6240\u6709\u9519\u8bef\u548c\u8b66\u544a\u4fe1\u606f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>3\u3001\u81ea\u5b9a\u4e49\u9519\u8bef\u548c\u5f02\u5e38<\/p>\n<p>\u53c2\u8003\u51fd\u6570\uff1atrigger_error<br \/>\nset_error_handler<\/p>\n<p>set_exception_handler<\/p>\n<p>register_shutdown_function<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u6253\u5f00\uff0f\u5173\u95ed\u9519\u8bef\u63d0\u793a\u7684\u65b9\u6cd5\u5305\u62ec\uff1aa\u3001\u66f4\u6539php.ini\u6587\u4ef6 b\u3001\u4f7f\u7528ini_set\u8bbe\u7f6e\uff0c\u8be6\u89c1\u4e0b\u8868 &nbsp; \u53d8\u91cf php.ini \u8bed\u6cd5\uff1a\u53d8\u91cf=\u503c ini_set \u8bed\u6cd5\uff1aini_set(\u201c\u53d8\u91cf\u201d,\u503c) \u8bf4\u660e display_errors On \/ Off \u00a0on \/ off\uff0ctrue \/ false , 1\/ 0 \u5f00\u542f\/\u5173\u95ed\u663e\u793a\u9519\u8bef\u63d0\u793a\uff0c\u4f46\u4e0d\u5f71\u54cd\u9519\u8bef\u5199\u5165\u65e5\u5fd7\u3002\u5373display_errors\u5173\u95ed\uff0c\u9519\u8bef\u4fe1\u606f\u53ef\u4ee5\u5199\u5165\u65e5\u5fd7\uff0c\u4ec5\u4e0d\u5728\u5ba2\u6237\u7aef\u663e\u793a\u800c\u5df2\u3002 error_reporting \u89c1\u4e0b\u8868 \u89c1\u4e0b\u8868 \u663e\u793a\u9519\u8bef\u7ea7\u522b display_startup_errors On \/ Off on \/ off\uff0ctrue \/ false , 1\/ 0 \u5373\u4f7f display_errors \u8bbe\u7f6e\u4e3a\u5f00\u542f, PHP \u542f\u52a8\u8fc7\u7a0b\u4e2d\u7684\u9519\u8bef\u4fe1\u606f\u4e5f\u4e0d\u4f1a\u88ab\u663e\u793a\u3002\u5f3a\u70c8\u5efa\u8bae\u9664\u4e86\u8c03\u8bd5\u76ee\u7684\u4ee5\u5916\uff0c\u5c06 display_startup_errors \u8bbe\u7f6e\u4e3a\u5173\u95ed\u3002\u548cE_CORE_ERROR\u3001E_CORE_WARNING\u6709\u5173 log_errors On \/ Off \uff0d \u8bbe\u7f6e\u662f\u5426\u5c06\u811a\u672c\u8fd0\u884c\u7684\u9519\u8bef\u4fe1\u606f\u8bb0\u5f55\u5230\u670d\u52a1\u5668\u9519\u8bef\u65e5\u5fd7\u6216\u8005error_log\u4e4b\u4e2d\u3002\u6ce8\u610f\uff0c\u8fd9\u662f\u4e0e\u670d\u52a1\u5668\u76f8\u5173\u7684\u7279\u5b9a\u914d\u7f6e\u9879\u3002 \u6ce8\u610f\uff1a\u5982\u679c\u8be5\u9009\u9879\u5173\u95ed\uff0c\u5219nginx\u90fd\u65e0\u6cd5\u83b7\u53d6\u5230\u9519\u8bef\u65e5\u5fd7 error_log \u65e5\u5fd7\u8def\u5f84 \uff0d [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-27435","post","type-post","status-publish","format-standard","hentry","category-docker"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27435","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=27435"}],"version-history":[{"count":1,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27435\/revisions"}],"predecessor-version":[{"id":27442,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27435\/revisions\/27442"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}