PHP5

Autoloading objects

To save the hassle of requiring all modules, the autoload function can be used to load object libraries as they are needed:

function __autoload($class_name) {
   require_once $class_name . '.class.php';
}
 
php5.txt · Last modified: 2009/04/21 09:12 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki