我需要在警告框后关闭窗口,我使用了Stack Question中提出的代码。但是我的警告框位于php代码中,我成功弹出了警告框,但当我关闭它时,窗口却没有被关闭。由于我是php新手,以下是我的代码,请帮忙看看。
<?php
$serial_get = trim(str_replace("(","",str_replace(")","",GetVolumeLabel("d"))));
if ($serial_get == '1233-2AZ2'){
}
else{
echo '<script language="javascript">
window.alert("This is not a Licensed Software. Please contact IT Solutions.");
window.close()
</script>'; }?>