mirror of
https://github.com/kokororin/typecho-plugin-Access.git
synced 2025-03-23 08:10:24 +08:00
Update bootstrap file
This commit is contained in:
parent
49078288de
commit
3a9bf16e98
@ -1,17 +1,6 @@
|
||||
<?php
|
||||
define('__ACCESS_PLUGIN_ROOT__', __DIR__);
|
||||
|
||||
if (function_exists('spl_autoload_register')) {
|
||||
spl_autoload_register(function ($className) {
|
||||
$filePath = __ACCESS_PLUGIN_ROOT__ . '/' . $className . '.php';
|
||||
if (file_exists($filePath)) {
|
||||
require_once $filePath;
|
||||
} else {
|
||||
throw new Typecho_Plugin_Exception($filePath . ' is not existed');
|
||||
}
|
||||
});
|
||||
} else {
|
||||
foreach (glob(__ACCESS_PLUGIN_ROOT__ . '/Access_*.php') as $filePath) {
|
||||
require_once $filePath;
|
||||
}
|
||||
foreach (glob(__ACCESS_PLUGIN_ROOT__ . '/Access_*.php') as $filePath) {
|
||||
require_once $filePath;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user