mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-15 04:35:34 +08:00
update to build 418
This commit is contained in:
@@ -3,11 +3,29 @@
|
||||
* @since 2.5
|
||||
*/
|
||||
|
||||
use ZM\Config\ZMConfig;
|
||||
use ZM\Console\Console;
|
||||
use ZM\Store\LightCacheInside;
|
||||
use ZM\Store\ZMAtomic;
|
||||
use ZM\Utils\DataProvider;
|
||||
use ZM\Utils\Terminal;
|
||||
|
||||
set_coroutine_params([]);
|
||||
|
||||
// 模拟define
|
||||
chdir(__DIR__.'/../');
|
||||
chdir(__DIR__ . '/../');
|
||||
define("WORKING_DIR", getcwd());
|
||||
define("SOURCE_ROOT_DIR", WORKING_DIR);
|
||||
define("ZM_DATA", WORKING_DIR . "/zm_data/");
|
||||
define("LOAD_MODE", 0);
|
||||
define("FRAMEWORK_ROOT_DIR", realpath(__DIR__ . "/../"));
|
||||
|
||||
ZMConfig::setDirectory(WORKING_DIR."/config/");
|
||||
ZMConfig::setEnv("");
|
||||
if (ZMConfig::get("global") === false) {
|
||||
die (zm_internal_errcode("E00007") . "Global config load failed: " . ZMConfig::$last_error . "\nError path: " . DataProvider::getSourceRootDir() . "\nPlease init first!\nSee: https://github.com/zhamao-robot/zhamao-framework/issues/37\n");
|
||||
}
|
||||
LightCacheInside::init();
|
||||
ZMAtomic::init();
|
||||
Terminal::init();
|
||||
Console::setLevel(4);
|
||||
Reference in New Issue
Block a user