9b8bec700a
http://php.net/manual/en/function.autoload.php http://php.net/spl_autoload_register https://wiki.php.net/rfc/deprecations_php_7_2
13 wiersze
266 B
PHP
13 wiersze
266 B
PHP
<?php
|
|
require_once "functions.php";
|
|
|
|
spl_autoload_register(function($class) {
|
|
$class_file = str_replace("_", "/", strtolower(basename($class)));
|
|
|
|
$file = dirname(__FILE__)."/../classes/$class_file.php";
|
|
|
|
if (file_exists($file)) {
|
|
require $file;
|
|
}
|
|
|
|
});
|