<?
// +----------------------------------------------------------------------
// 最便捷的php框架
// +----------------------------------------------------------------------
// | Copyright (c) 2011 http://www.ky53.net All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.ky53.net )
// +----------------------------------------------------------------------

/**
 
 * @author   qq:974005652(zhx626@126.com) by老顽童
 * @version  1.0
 +------------------------------------------------------------------------------
 */
function error($id,$str){
  switch ($id){
   case 0:
   trigger_error('文件"'.$str.'" 不存在',E_USER_ERROR);
   break;
   case 1:
   trigger_error('方法"'.$str.'()" 不存在',E_USER_ERROR);
   break;
   case 2:
   trigger_error('类"'.$str.'()" 不存在',E_USER_ERROR);
   break;
    case 3:
   trigger_error($str,E_USER_ERROR);
   break;
   default:
   break;


  }

}

function customError($errno, $errstr, $errfile, $errline)
 { 
 echo "<htmL><title>错误：$errstr</title>";
 echo "<div style='font-size:30px;height:80px;background:#A5360B;color:#ffffff;padding-top:20px;padding-left:50px;'>最实用的PHP框架</div>";
 echo "<div style='padding:80px; background:#C4FCA9;margin-top:30px;line-height:30px;'>";
 echo "<h2>科亿报错</h2>";
 echo "<b>错误信息:</b> 错误号[$errno] $errstr<br />";
 //echo " 错误信息在文件$errfile 中第$errline 行<br /></div>";

 echo "<div style='height:80px;background:#A5360B;color:#ffffff;padding-top:20px;padding-left:50px;margin-top:30px;'><div style=''>power by ky53.net <a href=#>帮助手册</a></div>";
 echo "<div style=''>官方网站：<a href=http://www.ky53.net>http:www.ky53.net</a></div>";
 echo "<div style=''>版本：v1.0 by 老顽童  联系：E-mail:zhx626@126.com QQ:974005652 </div></div>";
 echo "<pre>";
 //dump(debug_print_backtrace());
 echo "</pre>";
 echo "</html>";
 die();
 }



//set error handler
set_error_handler("customError",E_ERROR|E_USER_ERROR|E_RECOVERABLE_ERROR|E_CORE_ERROR|E_WARNING);

//trigger error



?>