Autoloader.php 516 B

123456789101112131415
  1. <?php
  2. function VodClassLoader($class)
  3. {
  4. $path = str_replace('\\', DIRECTORY_SEPARATOR, $class);
  5. $file = __DIR__ . DIRECTORY_SEPARATOR . 'uploader'. DIRECTORY_SEPARATOR . $path . '.php';
  6. if (file_exists($file)) {
  7. require_once $file;
  8. }
  9. }
  10. spl_autoload_register('VodClassLoader');
  11. require_once __DIR__ . DIRECTORY_SEPARATOR . 'aliyun-php-sdk-core' . DIRECTORY_SEPARATOR . 'Config.php';
  12. require_once __DIR__ . DIRECTORY_SEPARATOR . 'aliyun-php-sdk-oss' .DIRECTORY_SEPARATOR . 'autoload.php';