这对我来说很好db-error.php
wp含量:
如果不需要,请删除邮件程序块
<?php header(\'HTTP/1.1 503 Service Temporarily Unavailable\'); ?>
<?php
$to = "[email protected]";
$subject = "My Database is down";
$message = "My Database is down";
$headers = "MIME-Version: 1.0\\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\\n";
$headers .= "X-Mailer: php\\n";
$headers .= "From: \\"Admin\\" <[email protected]>\\n";
mail($to,$subject,$message,$headers);
?>
<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>503 Service Temporarily Unavailable</title>
<style type="text/css">
h1, p {
font-family: Helvetica, sans-serif;
font-size: 26px;
color: #333;
}
p {
font-size: 16px;
}
</style>
</head>
<body>
<center>
<h1>My Site is taking a nap right now....</h1>
<p>But really, we\'re currently experiencing technical issues — Please check back soon....</p>
</center>
</body>
</html>