blessing-skin-server/libraries/autoloader.php

19 lines
595 B
PHP
Raw Normal View History

2016-02-02 21:23:20 +08:00
<?php
/**
2016-03-19 10:28:18 +08:00
* @Author: printempw
2016-02-02 21:23:20 +08:00
* @Date: 2016-02-02 21:17:59
2016-03-12 17:21:30 +08:00
* @Last Modified by: printempw
2016-03-26 19:05:09 +08:00
* @Last Modified time: 2016-03-26 18:53:05
2016-02-02 21:23:20 +08:00
*/
function __autoload($classname) {
global $dir;
2016-03-18 17:49:52 +08:00
// echo $classname.'<br />';
2016-03-26 18:50:47 +08:00
$include_dir = $dir.DIRECTORY_SEPARATOR."libraries".DIRECTORY_SEPARATOR;
2016-03-18 17:49:52 +08:00
$filename = $include_dir.str_replace('\\', DIRECTORY_SEPARATOR, $classname) . '.class.php';
require_once($filename);
2016-02-02 21:23:20 +08:00
}
2016-03-12 17:21:30 +08:00
if (!file_exists($dir.'/config.php'))
2016-03-12 18:37:06 +08:00
Utils::showErrorPage(-1, '未找到 `config.php`,请确认配置文件是否存在。');
2016-02-04 18:35:14 +08:00
require "$dir/config.php";