• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > 编程与数据库 > php编程 >

分享几个非常有用的PHP代码片段(5)

来源: www.dedecms8.com 编辑:织梦吧 时间:2012-02-08点击:

 

  $email .= "

" . print_r($vars, 1) . "

";

 

  $headers = 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

  // Email the error to someone...

  error_log($email, 1, 'you@youremail.com', $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("There was an error. Please try again later.");

  }

  }

  // We should use our custom function to handle errors.

  set_error_handler('nettuts_error_handler');

  // Trigger an error... (var doesn't exist)

  echo $somevarthatdoesnotexist;

标签: 非常 几个 分享

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1170734538@qq.com ,  QQ