autoload.php 318 B

1234567891011121314
  1. <?php
  2. function classLoader($class)
  3. {
  4. $path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
  5. $file = __DIR__ . '/src/' . $path . '.php';
  6. if (file_exists($file)) {
  7. require_once $file;
  8. }
  9. }
  10. spl_autoload_register('classLoader');
  11. require_once __DIR__ . '/src/Qiniu/functions.php';