<script>
function onProgress(currentTime) {
if(currentTime > 20) {
console.log("the video reached 20 seconds!");
<?php
include("ayar.php");
$mysqli = connection();
$email = $_POST['email'];
$hak = '1';
$sorgu = mysqli_query($mysqli,"INSERT INTO gift_chance(email,hak) values ('$email', '$hak')");
?>
}
}
</script>
这种用法有可能吗?如果currentTime大于给定的秒数,我想执行php代码。