ttrss/include/autoload.php

14 lines
266 B
PHP
Raw Normal View History

2013-04-17 11:36:34 +00:00
<?php
2013-04-24 05:05:56 +00:00
require_once "functions.php";
spl_autoload_register(function($class) {
2013-04-17 11:36:34 +00:00
$class_file = str_replace("_", "/", strtolower(basename($class)));
$file = dirname(__FILE__)."/../classes/$class_file.php";
if (file_exists($file)) {
require $file;
}
});