showErr()

function showErr($type,$msg)
{
$phpmsg = debuginfo();
ob_end_clean();
$host = $_SERVER['HTTP_HOST'];
echo <<<EOT
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>$host - $type 系统错误</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body { color: black; }
#container { 650px; }
#message   { 650px; color: black; }
#bodytitle { font: 13pt/15pt verdana, arial, sans-serif; height: 35px; vertical-align: top; }
.bodytext  { font: 10pt/11pt verdana, arial, sans-serif; }
.help  { font: 12px verdana, arial, sans-serif; color: red;}
.red  {color: red;}
a:link     { font: 10pt/11pt verdana, arial, sans-serif; color: red; }
a:visited  { font: 10pt/11pt verdana, arial, sans-serif; color: #4e4e4e; }
</style>
</head>
<body>
<table cellpadding="1" cellspacing="5" id="container">
<tr>
<td id="bodytitle" width="100%">$type Error </td>
</tr><tr>
<td class="bodytext">Your request has encountered a problem. </td>
</tr><tr><td><hr size="1"/></td></tr>
<tr><td class="bodytext">Error messages: </td></tr>
<tr>
<td class="bodytext" id="message">
<ul> $msg</ul>
</td>
</tr><tr><td class="bodytext">&nbsp;</td></tr>
<tr><td class="bodytext">Program messages: </td></tr>
<tr>
<td class="bodytext">
<ul> $phpmsg </ul>
</td>
</tr><tr>
<td class="help"><br /><br /><a href="http://$host">$host</a> 系统出现错误, 由此给您带来的访问不便我们深感歉意</td>
</tr>
</table>
</body>
</html>
EOT;
exit;
}
原文地址:https://www.cnblogs.com/csjoz/p/7243856.html