autoload.php 437 B

1234567891011121314151617181920212223242526
  1. <?php
  2. ###
  3. # @name Autoload
  4. # @copyright 2015 by Tobias Reich
  5. ###
  6. if (!defined('LYCHEE')) exit('Error: Direct access is not allowed!');
  7. spl_autoload_register(function($class) {
  8. $file = LYCHEE . 'php/modules/' . $class . '.php';
  9. if (file_exists($file)===true) require $file;
  10. });
  11. spl_autoload_register(function($class) {
  12. $file = LYCHEE . 'php/access/' . $class . '.php';
  13. if (file_exists($file)===true) require $file;
  14. });
  15. ?>