autoload.php 465 B

1234567891011121314151617
  1. <?php
  2. spl_autoload_register(function ($class) {
  3. $name = str_replace('AlibabaCloud\\OpenApiUtil\\', '', $class);
  4. $file = __DIR__ . \DIRECTORY_SEPARATOR . 'src' . \DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $name) . '.php';
  5. if (file_exists($file)) {
  6. require_once $file;
  7. return true;
  8. }
  9. return false;
  10. });
  11. if (file_exists(__DIR__ . '/vendor/autoload.php')) {
  12. require_once __DIR__ . '/vendor/autoload.php';
  13. }