Php top-level class (for users)-PHP source code

Source: Internet
Author: User
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;
}
}
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.