This commit is contained in:
2022-03-21 11:16:38 +08:00
commit e89e807c64
1040 changed files with 284164 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
require_once dirname(__FILE__) . '/../public/init.php';
if ($argc < 3) {
echo "Usage: {$argv[0]} <username> <password> [role=admin|super]\n";
echo "\n";
exit;
}
$username = $argv[1];
$password = $argv[2];
$role = isset($argv[3]) ? $argv[3] : '';
$domain = new Portal\Domain\Admin();
if ($domain->createAdmin($username, $password, $role)) {
echo "运营平台管理员账号创建成功!\n";
} else {
echo "运营平台管理员账号已存在,不能重复创建!\n";
}