install_db
This commit is contained in:
@@ -87,6 +87,20 @@ if($result !== true){
|
||||
}
|
||||
|
||||
if (!class_exists('\\sammo\\DB')) {
|
||||
$loader = require __DIR__.'/../vendor/autoload.php';
|
||||
$loader->addClassMap((function () {
|
||||
$d_settingMap = [];
|
||||
foreach (glob(__DIR__.'/d_setting/*.orig.php') as $filepath) {
|
||||
$filepath = str_replace('.orig.php', '.php', $filepath);
|
||||
if(!file_exists($filepath)) {
|
||||
continue;
|
||||
}
|
||||
$filename = basename($filepath);
|
||||
$classname = explode('.', $filename)[0];
|
||||
$d_settingMap['sammo\\'.$classname] = $filepath;
|
||||
};
|
||||
return $d_settingMap;
|
||||
})());
|
||||
opcache_reset();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user