exe脚本或文件的30秒倒数计时器

时间:2014-02-17 14:28:14

标签: javascript php jquery timer

我有一个php文件,当它从互联网上调用时运行,它从http请求中捕获数据并存储在Mysql DB中。它在后台运行 我想添加一个倒数计时器,因为如果我的系统中的一个状态不是真的,它会运行一个脚本,如果是,则运行另一个脚本。 我更喜欢服务器端。

我的php文件:

require("config.php");

$doors=$_GET['doors'];

if (func == true) {
    mysql_connect(localhost,$username,$password);
    @mysql_select_db($database) or die( "Unable to select database");

    $query = "INSERT INTO `futelldus_doors`(`id`, `event`, `date`, `time`) VALUES ('','$doors',NOW(),NOW())";
    mysql_query($query);

    mysql_close();
} else {
    // Run timer 30 seconds countdown and then run another script or function 
}

它的倒计时功能我想不通! 如何将此功能添加到我的文件/脚本中?

0 个答案:

没有答案