UrlManipulator-php/server/autoloader.php

11 lines
342 B
PHP
Raw Permalink Normal View History

2023-12-12 20:25:41 +00:00
<?php
// this is a custom autoloader that will load classes from the current directory
2023-12-12 20:25:41 +00:00
function customAutoloader($className) {
$filePath = __DIR__ . '/' . str_replace('\\', '/', $className) . '.php';
if (file_exists($filePath)) {
include $filePath;
}
}
// register the custom autoloader
2023-12-12 20:25:41 +00:00
spl_autoload_register('customAutoloader');