Skip to content

Instantly share code, notes, and snippets.

@Burakhan
Last active December 16, 2015 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Burakhan/5506176 to your computer and use it in GitHub Desktop.
Save Burakhan/5506176 to your computer and use it in GitHub Desktop.
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