Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. /** Misc classes autoloader.
  3. *
  4. * @version SVN: $Id: classloader.php 530 2017-04-12 22:33:50Z anrdaemon $
  5. */
  6.  
  7. spl_autoload_register(function($className)
  8. {
  9. $file = new SplFileInfo(__DIR__ . strtr("/$className.php", '_', '/'));
  10. $path = $file->getRealPath();
  11. if(!empty($path))
  12. {
  13. include_once $path;
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement