Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
php __autoload class "lib/{className}.php
<?php
/**
* @param mixeds $className
**/
function __autoload($className){
$file = "./lib/{$className}.php";
if(file_exists($file)){
require_once($file);
}else{
throw new Exception("{$className}.php file not found !! ");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment