ip-lib.php 350 B

12345678910111213
  1. <?php
  2. spl_autoload_register(
  3. function ($class) {
  4. if (strpos($class, 'IPLib\\') !== 0) {
  5. return;
  6. }
  7. $file = __DIR__ . DIRECTORY_SEPARATOR . 'src' . str_replace('\\', DIRECTORY_SEPARATOR, substr($class, strlen('IPLib'))) . '.php';
  8. if (is_file($file)) {
  9. require_once $file;
  10. }
  11. }
  12. );