在同一页面中多次Header
有多个站点,需要发送消息。如bbs1.test.com/getmessage.php?var=msg1bbs2.test.com/getmessage.php?var=m...
有多个站点,需要发送消息。
如
bbs1.test.com/getmessage.php?var=msg1
bbs2.test.com/getmessage.php?var=msg2
....
bbsN.test.com/getmessage.php?var=msgN
问在一个程序脚本中如何推送?
<?php
ob_start();
header("Location: bbs1.test.com/getmessage.php?var=msg1");
ob_clean();
ob_start();
header("Location: bbs2.test.com/getmessage.php?var=msg2");
ob_clean();
....
ob_start();
header("Location: bbsN.test.com/getmessage.php?var=msgN");
ob_clean();
?> 展开
如
bbs1.test.com/getmessage.php?var=msg1
bbs2.test.com/getmessage.php?var=msg2
....
bbsN.test.com/getmessage.php?var=msgN
问在一个程序脚本中如何推送?
<?php
ob_start();
header("Location: bbs1.test.com/getmessage.php?var=msg1");
ob_clean();
ob_start();
header("Location: bbs2.test.com/getmessage.php?var=msg2");
ob_clean();
....
ob_start();
header("Location: bbsN.test.com/getmessage.php?var=msgN");
ob_clean();
?> 展开
1个回答
展开全部
你这样是不行的,最缺扰敬后一个ob_clear之前的内容全部是废的。
一般情况下,我认为你不显示bbsN.test.com/getmessage.php?var=msgN 调用后的结果,那么你可以这样:
echo "<iframe src=bbs1.test.com/getmessage.php?var=msg1 style="display:none">;
echo "<iframe src=bbs2.test.com/伏慎getmessage.php?var=msg2 style="display:none"李陪>;
echo "<iframe src=bbs3.test.com/getmessage.php?var=msg3 style="display:none">;
echo "<iframe src=bbs4.test.com/getmessage.php?var=msg4 style="display:none">;
一般情况下,我认为你不显示bbsN.test.com/getmessage.php?var=msgN 调用后的结果,那么你可以这样:
echo "<iframe src=bbs1.test.com/getmessage.php?var=msg1 style="display:none">;
echo "<iframe src=bbs2.test.com/伏慎getmessage.php?var=msg2 style="display:none"李陪>;
echo "<iframe src=bbs3.test.com/getmessage.php?var=msg3 style="display:none">;
echo "<iframe src=bbs4.test.com/getmessage.php?var=msg4 style="display:none">;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询