You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
412 B
PHP
16 lines
412 B
PHP
<?php
|
|
function __autoload($class) {
|
|
$class_file1 = str_replace("_", "/", basename($class)); // PSR-0
|
|
$class_file2 = str_replace("_", "/", strtolower(basename($class)));
|
|
|
|
$file1 = dirname(__FILE__)."/../classes/$class_file1.php";
|
|
$file2 = dirname(__FILE__)."/../classes/$class_file2.php";
|
|
|
|
if (file_exists($file1)) {
|
|
require $file1;
|
|
} elseif (file_exists($file2)) {
|
|
require $file2;
|
|
}
|
|
}
|
|
?>
|