【发布时间】:2011-08-03 19:08:22
【问题描述】:
每 4 秒我刷新一个 php 页面并更新时间。 每次发生这种情况时,我都想将时间发送到另一个页面,但不要离开该页面 真是让人耳目一新……
下面是一些示例代码:
<?
$target = mktime(10, 0, 0, 0, 0, 0) ;
header('refresh:4; url=timer.php');
$today = (int)(time ());
$siteToReceiveTime = "http://www.nbit.co.za/toriggo/receive.php?time=$today";
print "time in $today seconds";
?>
【问题讨论】:
-
为什么不直接存储到数据库中呢?