カスタムset_error_handler()
セットがあり、エラーが発生し続ける mPDF を使用しています。
私のカスタム エラー ハンドラ:
function error_handler($number, $message, $file, $line, $vars) {
$email = "
<p>An error (".$number.") occurred on line
<strong>".$line."</strong> and in the <strong>file: $file.</strong>
<p> ".$message." </p>";
$email .= "<pre>" . print_r($vars, 1) . "</pre>";
$headers = 'From: '.ADMIN_EMAIL.'\r\n';
$headers .= "Subject: Error from ".SITE_NAME."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Email the error to the webmaster
error_log($email, 1, ERROR_EMAIL, $headers);
// Make sure that you decide how to respond to errors (on the user's side)
// Either echo an error message, or kill the entire project. Up to you...
// The code below ensures that we only "die" if the error was more than
// just a NOTICE.
if ( ($number !== E_NOTICE) && ($number < 2048) ) {
die("Oops! Looks like there was an error on this page. Please go back to the page you were on and try again later.<br />If problems persist please contact us at <a href=\"mailto:".ADMIN_EMAIL."\">".ADMIN_EMAIL."</a>");
}
}
ファイルMPDF56/classes/cssmgr.php
とエラーMPDF56/mpdf.php
が吐き出され続け、これらの両方のページの上部にUndefined index
追加したにもかかわらずerror_reporting(0);
、レポートを取得し続け、PDF の出力を抑制し、電子メールを約 9000 (つまり、9000) でいっぱいにします。各 PDF を電子メールで送信します。
これらのページだけのエラーログを無効にする方法を知っている人はいますか?? カスタムを使用して、サイトの残りの部分でそれらを取得したいset_error_handler()
.