11 lines
No EOL
342 B
PHP
11 lines
No EOL
342 B
PHP
<?php
|
|
// this is a custom autoloader that will load classes from the current directory
|
|
function customAutoloader($className) {
|
|
$filePath = __DIR__ . '/' . str_replace('\\', '/', $className) . '.php';
|
|
|
|
if (file_exists($filePath)) {
|
|
include $filePath;
|
|
}
|
|
}
|
|
// register the custom autoloader
|
|
spl_autoload_register('customAutoloader'); |