我在页面嵌入sky后,有的时候嵌入的sky区域弹出"无法打开站点,以终止操作",其他区域显示正常。有的时候sky嵌入区域显示正常,这是怎么回事啊?
我用了两个文件sky.php和sky.htm
sky.php代码:
<?php
$suijishu=rand(1,5);
require_once './common.php';
require_once './source/function_common.php';
include_once(S_ROOT.'./source/function_cp.php');
$icon = 'sky';
if($suijishu==1){
$title_template = '{actor} 向 <a href="sky.php">SKY天空许愿</a>!';
}
if($suijishu==2){
$title_template = '{actor} 正在 <a href="sky.php">SKY</a> 在天空发了一颗小星星!';
}
if($suijishu==3){
$title_template = '{actor} 进入了 <a href="sky.php">SKY</a> 给远方的朋友捎去了祝福!';
}
if($suijishu==4){
$title_template = '{actor} 正在 <a href="sky.php">SKY</a> 为自己许下了心愿!';
}
if($suijishu==5){
$title_template = '去 <a href="sky.php">SKY</a> 许个愿吧!你一定会梦想成真!';
}
feed_add($icon, $title_template);
include template('sky');
?>
sky.htm代码:
<!--{template header}-->
<div class="c_header a_header">
<h1>:::SKY:::向天空大声的说出你的愿望!都会实现的!</h1>
</div>
<center>
<IFRAME id=headlogin marginWidth=0 marginHeight=0 src="/sky/" frameBorder=0 width=100% scrolling=no height=550 onload="this.height=this.contentWindow.document.body.scrollHeight"></IFRAME><br><br>
<script language=javascript>
// 自动 COPY 代码开始
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function JM_cc(ob){
var obj=MM_findObj(ob); if (obj) {
obj.select();js=obj.createTextRange();js.execCommand("Copy");}
alert("复制成功!您可以将SKY天空许愿推荐给您的朋友!");
}
</script>
<script language=javascript>
document.write('<input name="page_url" value="'+window.location.href+'" size="40">');
</script>
<input type="button" name="Button" style=color:red value="邀请朋友一起来SKY天空许愿" onclick=JM_cc("page_url") />
</div>
</div>
</center>
<br>
<!--{template footer}--> |