刷新问题 [英] Problem with refresh
问题描述
标题(" refresh:5; $ url");
i使用上面的代码每5秒刷新一次页面的内容。
但是我得到了以下errosr
警告:无法修改标题信息 - 已在c:\rss; \\ macgpie_simple_2.php中发送的标题(输出从c:\ rss \ macgpie_simple_2.php:3开始)在第86行
所以我添加了这两行
header(Cache-Control:no-cache,must-revalidate);
header(" Expires:Mon,26 Jul 1997 05:00:00 GMT");
即使在上面的代码得到相同的警告之后。
请帮助。重要
header("refresh: 5; $url");
i used the above code to refresh the contents of a page every 5 seconds.
but i got the following errosr
Warning: Cannot modify header information - headers already sent by (output started at c:\rss\magpie_simple_2.php:3) in c:\rss\magpie_simple_2.php on line 86
so i added these two lines
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
even after that am getting the same warning for the above code.
pls help.its important
推荐答案
url");
i使用上面的代码每5秒刷新一次页面的内容。
但是我得到了以下的errosr
警告:无法修改标题信息 - 已在第86行的c:\ rss \ macgpie_simple_2.php中发送的标题(输出从c:\ rss\magpie_simple_2.php:3开始)
所以我添加了这两行
header(" Cache-Control:no-cache,must-revalidate");
header(" Expires:Mon,26 Jul 1997 05:00:00 GMT");
即使在上面的代码得到相同的警告之后。
请帮助。重要
url");
i used the above code to refresh the contents of a page every 5 seconds.
but i got the following errosr
Warning: Cannot modify header information - headers already sent by (output started at c:\rss\magpie_simple_2.php:3) in c:\rss\magpie_simple_2.php on line 86
so i added these two lines
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
even after that am getting the same warning for the above code.
pls help.its important
您应该在输出任何其他信息之前发送标头。
确保您的脚本在发送标头之前没有输出。它可能是空格,html标签甚至是php-errors。
You should send headers before any other information to output.
Make sure your script has no output before sending headers. It could be spaces, html-tags even php-errors.
在magpie_simple_2.php的第3行,你已经向浏览器输出了一些内容。
发布你的代码我们来看看:)
On line 3 of magpie_simple_2.php you have output something to the browser.
Post your code and we''ll have a look see :)
这篇关于刷新问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!