1 Star 0 Fork 1.6K

SyncGithub/ leadshop

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
InstallController.php 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
稻草人 提交于 2021-05-31 16:47 +08:00 . V1.2.4
<?php
namespace leadmall\api;
use app\forms\install\InstallForm;
use basics\api\BasicsController as BasicsModules;
use leadmall\Map;
class InstallController extends BasicsModules implements Map
{
public function actionIndex()
{
$result = file_exists(\Yii::$app->basePath . '/install.lock');
return ['check' => $result, 'version' => app_version()];
}
public function actionCreate()
{
if (file_exists(\Yii::$app->basePath . '/install.lock')) {
Error('禁止访问');
}
if (\Yii::$app->request->isPost) {
$form = new InstallForm();
$form->attributes = \Yii::$app->request->post();
return $form->install();
} else {
Error('访问错误');
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/sync-github/leadshop.git
git@gitee.com:sync-github/leadshop.git
sync-github
leadshop
leadshop
master

搜索帮助