autoload.php 578 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * @ignore 自动加载
  4. */
  5. if ( file_exists(dirname(__FILE__).'/vendor/autoload.php') ) {
  6. require_once dirname(__FILE__).'/vendor/autoload.php';
  7. }
  8. function class_loader($className)
  9. {
  10. $file = __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . str_replace("Easemob" . DIRECTORY_SEPARATOR, "", str_replace("\\", DIRECTORY_SEPARATOR, $className)) . '.php';
  11. if (file_exists($file)) {
  12. require_once $file;
  13. }
  14. }
  15. spl_autoload_register('class_loader');
  16. require __DIR__ . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'functions.php';