如何更改 XAMPP 报告的 PHP 错误的格式(在 HTML 中)?
How to change format of XAMPP reported PHP-error (in HTML)?
我想将XAMPP生成的错误从(完整-HTML-格式)更改为(简单格式-错误),例如:
这个:
<br />
<font size='1'>
<table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr>
<th align='left' bgcolor='#f57900' colspan="5">
<span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: act in D:\Z_web_prj\htdocs\mb\t_act.php on line
<i>3</i>
</th>
</tr>
<tr>
<th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th>
</tr>
<tr>
<th align='center' bgcolor='#eeeeec'>#</th>
<th align='left' bgcolor='#eeeeec'>Time</th>
<th align='left' bgcolor='#eeeeec'>Memory</th>
<th align='left' bgcolor='#eeeeec'>Function</th>
<th align='left' bgcolor='#eeeeec'>Location</th>
</tr>
<tr>
<td bgcolor='#eeeeec' align='center'>1</td>
<td bgcolor='#eeeeec' align='center'>0.4033</td>
<td bgcolor='#eeeeec' align='right'>364704</td>
<td bgcolor='#eeeeec'>{main}( )</td>
<td title='D:\Z_web_prj\htdocs\mb\t_act.php' bgcolor='#eeeeec'>...\t_act.php
<b>:</b>0
</td>
</tr>
</table>
</font>
格式更简单(类似于 Live Apache 托管报告的错误)
<br />
<b>Notice</b>: Undefined index: act in
<b>/home/user/public_html/kalivolumerootxyz/t_act.php</b> on line
<b>3</b>
<br />
即使只是一个 NOTICES,屏幕上的大红色横幅也让人非常恼火。谢谢。
那是 PHP 设置 html_errors
。将其设置为 html_errors=0
以将错误显示为纯文本。不要忘记重启 PHP 服务
我想将XAMPP生成的错误从(完整-HTML-格式)更改为(简单格式-错误),例如:
这个:
<br />
<font size='1'>
<table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr>
<th align='left' bgcolor='#f57900' colspan="5">
<span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined index: act in D:\Z_web_prj\htdocs\mb\t_act.php on line
<i>3</i>
</th>
</tr>
<tr>
<th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th>
</tr>
<tr>
<th align='center' bgcolor='#eeeeec'>#</th>
<th align='left' bgcolor='#eeeeec'>Time</th>
<th align='left' bgcolor='#eeeeec'>Memory</th>
<th align='left' bgcolor='#eeeeec'>Function</th>
<th align='left' bgcolor='#eeeeec'>Location</th>
</tr>
<tr>
<td bgcolor='#eeeeec' align='center'>1</td>
<td bgcolor='#eeeeec' align='center'>0.4033</td>
<td bgcolor='#eeeeec' align='right'>364704</td>
<td bgcolor='#eeeeec'>{main}( )</td>
<td title='D:\Z_web_prj\htdocs\mb\t_act.php' bgcolor='#eeeeec'>...\t_act.php
<b>:</b>0
</td>
</tr>
</table>
</font>
格式更简单(类似于 Live Apache 托管报告的错误)
<br />
<b>Notice</b>: Undefined index: act in
<b>/home/user/public_html/kalivolumerootxyz/t_act.php</b> on line
<b>3</b>
<br />
即使只是一个 NOTICES,屏幕上的大红色横幅也让人非常恼火。谢谢。
那是 PHP 设置 html_errors
。将其设置为 html_errors=0
以将错误显示为纯文本。不要忘记重启 PHP 服务