Last active
August 29, 2015 13:56
-
-
Save alex-cory/8996190 to your computer and use it in GitHub Desktop.
Example autoloader. #snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function autoloader($class) | |
{ | |
include_once 'classes/' . strtolower($class) . '.php'; | |
} | |
spl_autoload_register(autoloader); | |
// http://goo.gl/8xmrcx | |
// http://goo.gl/bHXxrX |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment