Load a PHP Class automatically upon instantiation (PHP5)
function __autoload($class_name) { require_once("classes/" . $class_name . ".php"); }
Usage:
$auth = new Auth;
Will automatically load the file "classes/Auth.php"
DZone Snippets > alexwilliams > class
12390 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Alex Williams http://www.alexwilliams.ca
function __autoload($class_name) { require_once("classes/" . $class_name . ".php"); }
$auth = new Auth;