首 页 ASP ASP.NET PHP JSP Ajax DIV+CSS JavaScript XML C#
MySQL MSSQL Access Oracle Linux Server 电脑技巧 网络安全 建站经验 其它

学习网页技术PHP中错误处理的一些方法

整理日期:2008年01月20日 【字体:


伊图教程网[www.etoow.com]
http://www.etoow.com/html/2008-01/1200806388.html
      $array[$key] = addslashes(stripslashes($value));
    } else if (is_array($value)) {
      $array[$key] = stripslashes_gpc($value);
    }
  }
  return $array;
}
/**
 * 处理程序中出现的错误
 * @Date:2006-10-9-10:51
 * @param  (类型)   (参数名)  (描述)
 */
function Error_Handler($errno,$errstr,$errorfile,$errline,$errtext){
  echo('系统发生错误:'.$errstr);
  echo('At'.$errorfile.'的第'.$errline.'行.');
  if($errno==E_USER_ERROR){
    echo('致命错误,程序已经中止');
  }

}
  if(get_magic_quotes_gpc()){
  $_GET=    stripslashes_gpc($_GET);
  $_POST=  stripslashes_gpc($_POST);
  $_COOKIE=  stripslashes_gpc($_COOKIE);
}
  set_magic_quotes_runtime(0);#magic_quotes_runtime
function stripslashes_gpc($array) {
  while (list($key,$value) = each($array)) {
    if (is_string($value)) {
      $array[$key] = addslashes(stripslashes($value));
    } else if (is_array($value)) {
      $array[$key] = stripslashes_gpc($value);
    }
  }
  return $array;
}
/**
 * 处理程序中出现的错误
 * @Date:2006-10-9-10:51
Tags:
学习网页技术PHP中错误处理的一些方法
'http://www.etoow.com/html/2008-01/1200806388.html
1
 
2345
信息搜索
  
联系我们关于本站广告服务设为首页 收藏本站友情链接网站地图
Copyright © Etoow.com Inc. All Rights Reserved