对于楼主的问题,我想只能是用定时刷新的办法 ,参考下面的代码改一下,在frame里结合setTimeout+reload
<script>
var limit="0:10"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!"
else
curtime=cursec+"秒后重刷本页!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}}
window.onload=beginrefresh
</script>
<script>
var limit="0:10"
if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+"分"+cursec+"秒后重刷本页!"
else
curtime=cursec+"秒后重刷本页!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}}
window.onload=beginrefresh
</script>
解决方案 »
- 请教 curl 登陆 验证码的问题
- 请教一个关于 unexpected T_STRING 的问题;怎么改呢,谢谢!
- getArticleInfo()
- 菜鸟问题:这段有什么作用?
- 用group by 不符合条件他不返回数据
- 这是什么意思,谢谢
- PHPlib+PHP+FCKeditor问题
- 求救!!!session报错....不知道是那没配置好 ?
- 菜鸟的问题:关于Session怎么读入怎么写,怎么进行过期时间限制?
- 想要使用qq、新浪微博、支付宝账号进行第三方登录都需要申请appkey吗?
- 请推荐虚拟空间提供商(深圳)php+mysql 谢谢
- 我有个30M的表,用phpmyadmin导入时,总是不成功,有什么办法吗?
然后在头上加上一句:
<?header("Cache-Control: no-store, no-cache, must-revalidate");?>
这样调用的再入了
<?header("Cache-Control: no-store, no-cache, must-revalidate");?>
也一样,需要刷新二次才有显示
header("Cache-Control: no-store, no-cache, must-revalidate");
require_once '../../include/common.inc.php';
$maxnews=14;
$anews = $onews = array();
$qnews=$db->query("select id,title,html,dateline from tx_news_posts where cityid='$cityid' or city='$ncity[city]' order by id desc limit 0,$maxnews");
$tnews=$db->num_rows($qnews);
while($pm = $db->fetch_array($qnews)) {
$pm[dateline]=date("m-d",$pm[dateline]);
$anews[] = $pm;
}
$j=0;
foreach($anews as $pm) {
$newstitle=substr($pm[title],0,26).chr(0);
$newsurl=($pm[html]!="")?$pm[html]:"/article/detail.php?id=$pm[id]";
$j++;
echo "document.write(\"<a href=$newsurl target=_blank class='ntxt1'>$newstitle</a> <font color=#888888>$pm[dateline]</font><br>\");\n";
}
?>
////////////////////////////////////////////////////////////////////////////////////////
$now = gmdate("D, d M Y H:i:s") . " GMT";
header("Date: $now");
header("Expires: $now");
header("Last-Modified: $now");
header("Pragma: no-cache");
header("Cache-Control: no-store, no-cache, max-age=0, must-revalidate");
////////////////////////////////////////////////////////////////////////////////////////都加上去!!!!!!!
后面加上随机数