我正在创建一个Web应用程序,我可以在管理面板中添加更新按钮 更新按钮以替换GUI或替换整个html文件 实施例
<?php
if ( admin clicked update button) !== false) {
Replace login.html with https://github.com/new-version
}
任何人都可以帮我解决这个问题吗?
答案 0 :(得分:0)
当用户按下按钮时,您可以在HTML中执行此操作
<?php
error_reporting(0);
include "curl_gd.php";
if($_GET['id'] != ""){
$id = $_GET['id'];
$url = "https://drive.google.com/file/d/" . $id . "/view/";
$linkdown = Drive($url);
$file = '[{"type": "video/mp4", "label": "HD", "file":"' .$linkdown. '"}]';
}
?>
好抱歉试试这个
<button onclick="location.href='https://github.com/new-version'">Update</button>