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,32 @@
<?php
/**
* 安装插件
* @author dogstar 20200311
*/
require_once dirname(__FILE__) . '/../public/init.php';
if ($argc < 2) {
echo "Usage: {$argv[0]} <plugin_key>\n";
echo "请输入待安装的插件编号。\n";
echo "\n";
exit;
}
$pluginKey = trim($argv[1]);
if (!preg_match('/^[0-9A-Za-z_]{1,}$/', $pluginKey)) {
echo "插件编号格式不对,应该使用字母数字和下划线组合。\n";
echo "\n";
exit;
}
$plugin = new Portal\Domain\Plugin();
$detail = [];
$plugin->install($pluginKey, $detail);
echo implode("\n", $detail);
echo "\n";