mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-22 08:05:34 +08:00
cleanup code, update some features
add Hitokoto API add Closure for access_token add working_dir() global function adjust reply() method to .handle_quick_operation
This commit is contained in:
@@ -329,4 +329,11 @@ function uuidgen($uppercase = false) {
|
||||
$data[8] = chr(ord($data[8]) & 0x3f | 0x80);
|
||||
return $uppercase ? strtoupper(vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4))) :
|
||||
vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
|
||||
}
|
||||
}
|
||||
|
||||
function working_dir() {
|
||||
if (LOAD_MODE == 0) return WORKING_DIR;
|
||||
elseif (LOAD_MODE == 1) return LOAD_MODE_COMPOSER_PATH;
|
||||
elseif (LOAD_MODE == 2) return realpath('.');
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user