debugger.php
上传用户:jiangbw
上传日期:2022-03-16
资源大小:49k
文件大小:4k
- <?
- /*======================================================================*
- || #################################################################### ||
- || # BUILD UNDER PHP SCRIPTNET 3.2.1 FRAMEWORK ||
- || # ---------------------------------------------------------------- # ||
- || # Code2Art Open Source Software. All Rights Reserved. ||
- || # This file should be redistributed in whole or significant part. # ||
- || # ------------------ SCRIPTNET IS FREE SOFTWARE ------------------ # ||
- || # http://www.code2art.com | http://www.code2art.com/scriptnet # ||
- || # Copyleft by Benediktus Ardian Hersanto, SE # ||
- || # Sorry if this framework is still unavailable for public # ||
- || # because I still searching on my own head. # ||
- || #################################################################### ||
- *======================================================================*/
- /*======================================================================*
- || #################################################################### ||
- || DBF to MySQL Bulk Converter 2.0 ||
- ||______________________________________________________________________||
- || This utility was developed on 2006, since this were used to be on ||
- || my own library. But I think I should share it to you, because I ||
- || need to save my work on Internet (I don't believe on my own HD drive)||
- || it always crash and had a terrible bad sectors. ||
- || Thanks to all person who download this utility, I hope you enjoy it. ||
- || ||
- || Regards, ||
- || Benediktus Ardian Hersanto,SE (ardie_b@yahoo.com) ||
- /*======================================================================*/
- // ---------------------------------------------------------------------//
- // Free to use for everyone who understand PHP
- // ---------------------------------------------------------------------//
- error_reporting(E_ALL);
- if(phpversion()>="4.0.1") {
- if(!defined('_DEBUG_HANDLER')) {
- define('_DEBUG_HANDLER','PHP_FRAMEWORK_CLASSES');
- // GLOBAL ERROR CONTAINER
- if(isset($_ERROR)) global $_ERROR;
-
- function Exception($errcode='', $errstr='', $errfile='', $errline='') {
- global $_ERRORS;
- $filename = basename($errfile);
- $errstr = str_replace("rn","",str_replace("n","",$errstr));
- switch ($errcode) {
- case E_ERROR:
- $errorType = "FATAL ERROR";
- $err = file($errfile);
- $errSrc = htmlspecialchars(trim(addslashes($err[$errline-1])), ENT_QUOTES);
- global $COUNTER;
- $COUNTER++;
- break;
- case E_WARNING:
- $errorType = "WARNING";
- $err = file($errfile);
- $errSrc = htmlspecialchars(trim(addslashes($err[$errline-1])), ENT_QUOTES);
- global $COUNTER;
- $COUNTER++;
- break;
- case E_PARSE:
- $errorType = "PARSE ERROR";
- $err = file($errfile);
- $errSrc = htmlspecialchars(trim(addslashes($err[$errline-1])), ENT_QUOTES);
- global $COUNTER;
- $COUNTER++;
- break;
- case E_NOTICE:
- $errorType = "NOTICE ERROR";
- $err = file($errfile);
- $errSrc = htmlspecialchars(trim(addslashes($err[$errline-1])), ENT_QUOTES);
- global $COUNTER;
- $COUNTER++;
- break;
- case E_CORE_ERROR:
- echo "<b>CORE ERROR</b> [$errno] $errstr<br />n";
- break;
- case E_CORE_WARNING:
- echo "<b>WARNING</b> [$errno] $errstr<br />n";
- exit;
- break;
- case E_COMPILE_ERROR:
- echo "<b>WARNING</b> [$errno] $errstr<br />n";
- exit;
- break;
- case E_COMPILE_WARNING:
- echo "<b>WARNING</b> [$errno] $errstr<br />n";
- exit;
- break;
- case E_USER_ERROR:
- global $COUNTER;
- $COUNTER++;
- break;
- case E_USER_WARNING:
- global $COUNTER;
- $COUNTER++;
- break;
- case E_USER_NOTICE:
- global $COUNTER;
- $COUNTER++;
- break;
- }
- }
- $old_error_handler = set_error_handler("Exception");
- }
- ?>