Skip to content

Instantly share code, notes, and snippets.

@shameerc
Created September 13, 2010 10:32
Show Gist options
  • Save shameerc/577109 to your computer and use it in GitHub Desktop.
Save shameerc/577109 to your computer and use it in GitHub Desktop.
//for a number of classes to load automatically
//We can define the following function in our file
function __autoload($class_name)
{
$path = str_replace("_", "/", $class_name);
require_once $path.".php";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment