1 Star 0 Fork 0

HongKong/PVE-VDI-Gateway

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.php 858 Bytes
一键复制 编辑 原始数据 按行查看 历史
DJHongKong 提交于 2021-06-23 14:09 . Add files via upload
<?php
header('content-type:text/html;charset=utf-8');
unlink('admin/user.db');
unlink('temp/spice.vv');
class MyDB extends SQLite3
{
function __construct()
{
$this->open('admin/user.db');
}
}
$db = new MyDB();
if(!$db){
echo $db->lastErrorMsg();
} else {
echo "Opened database successfully\n";
}
$sql =<<<EOF
CREATE TABLE user
(ID INTEGER PRIMARY KEY AUTOINCREMENT,
USERNAME TEXT NOT NULL,
PASSWORD TEXT NOT NULL,
VMID INT NOT NULL,
NODE TEXT NOT NULL);
EOF;
$ret = $db->exec($sql);
if(!$ret){
echo $db->lastErrorMsg();
} else {
echo "Table created successfully\n";
}
$db->close();
$vvflie = fopen("temp/spice.vv", "w");
fclose($vvflie);
copy("install.php","install.php.bak");
unlink('install.php');
echo "<script type='text/javascript'>alert('初始化成功');
location.href='admin/admin.html';
</script>";
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/DJHongKong/PVE-VDI-Gateway.git
git@gitee.com:DJHongKong/PVE-VDI-Gateway.git
DJHongKong
PVE-VDI-Gateway
PVE-VDI-Gateway
main

搜索帮助