Ec (2); & lt ;? Php *** Object ** baseclass * @ version1.0.0 (MonAug0118: 43: 24CST2005) * @ authorsanshi * classObject {* Whether to output debugging information * var $ debugtrue; * ** Object * @ version1.0.0 (Mo script ec (2); script
/**
* Object
* Base class
* @ Version 1.0.0 (Mon Aug 01 18:43:24 CST 2005)
* @ Author sanshi
*/
Class Object
{
/* Whether to output debugging information */
Var $ debug = true;
/**
* Object
* @ Version 1.0.0 (Mon Aug 01 18:49:48 CST 2005)
* @ Author sanshi
* @ Deprecated destructor
*
* @ Return void
*/
Function Object ()
{
// Determine whether the user enters from the homepage
If (! Defined ('index '))
{
Die ("Hacking attempt ");
}
// Echo 'create Object success! ';
}
/**
* Msg_die
* @ Version 1.0.0 (Mon Aug 01 18:52:43 CST 2005)
* @ Author sanshi
* @ Deprecated debug information output
* @ Param string
* @ Return void
*/
Function msg_die ($ info, $ file, $ line)
{
If ($ this-> debug)
{
$ Format = "There is happen error information: % s .".
"The file name: % s, on line: % s .";
Printf ($ format, $ info, $ file, $ line );
$ Error = debug_backtrace ();
Print_r ($ error [0]);
}
}
/**
* SetDebug
* @ Version 1.0.0 (Mon Aug 01 18:56:45 CST 2005)
* @ Author sanshi
* @ Deprecated: sets whether to output debugging information.
* @ Param boolean true or false
* @ Return void
*/
Function setDebug ($ bool)
{
$ This-> debug = is_bool ($ bool )? $ Bool: false;
}
/**
* GetDebug
* @ Version 1.0.0 (Mon Aug 01 19:01:22 CST 2005)
* @ Author sanshi
* @ Deprecated: Check whether debugging information is enabled.
* @ Param void
* @ Return boolean
*/
Function getDebug ()
{
Return $ this-> debug;
}
}
?>