Autoloading PHP Classes to Reduce CPU Usage

by gowtham 2010-01-28 11:15:07



function __autoload ($class_name)
{
if (!class_exists($class_name, false)) {
$class_file_path = str_replace('_', '/', $class_name) . '.php';
require($class_file_path);
}
}

Tagged in:

890
like
0
dislike
0
mail
flag

You must LOGIN to add comments