<i id='QE8s9'><tr id='QE8s9'><dt id='QE8s9'><q id='QE8s9'><span id='QE8s9'><b id='QE8s9'><form id='QE8s9'><ins id='QE8s9'></ins><ul id='QE8s9'></ul><sub id='QE8s9'></sub></form><legend id='QE8s9'></legend><bdo id='QE8s9'><pre id='QE8s9'><center id='QE8s9'></center></pre></bdo></b><th id='QE8s9'></th></span></q></dt></tr></i><div id='QE8s9'><tfoot id='QE8s9'></tfoot><dl id='QE8s9'><fieldset id='QE8s9'></fieldset></dl></div>

  • <legend id='QE8s9'><style id='QE8s9'><dir id='QE8s9'><q id='QE8s9'></q></dir></style></legend>
  • <tfoot id='QE8s9'></tfoot>

  • <small id='QE8s9'></small><noframes id='QE8s9'>

      <bdo id='QE8s9'></bdo><ul id='QE8s9'></ul>

        PHP 标头(“刷新")问题

        时间:2023-11-30

        <small id='VwVJY'></small><noframes id='VwVJY'>

          <tfoot id='VwVJY'></tfoot>
          • <bdo id='VwVJY'></bdo><ul id='VwVJY'></ul>
            <legend id='VwVJY'><style id='VwVJY'><dir id='VwVJY'><q id='VwVJY'></q></dir></style></legend>

                <i id='VwVJY'><tr id='VwVJY'><dt id='VwVJY'><q id='VwVJY'><span id='VwVJY'><b id='VwVJY'><form id='VwVJY'><ins id='VwVJY'></ins><ul id='VwVJY'></ul><sub id='VwVJY'></sub></form><legend id='VwVJY'></legend><bdo id='VwVJY'><pre id='VwVJY'><center id='VwVJY'></center></pre></bdo></b><th id='VwVJY'></th></span></q></dt></tr></i><div id='VwVJY'><tfoot id='VwVJY'></tfoot><dl id='VwVJY'><fieldset id='VwVJY'></fieldset></dl></div>
                  <tbody id='VwVJY'></tbody>

                1. 本文介绍了PHP 标头(“刷新")问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一些类似的代码:

                  header('Refresh: 15; url=' . $url);
                  

                  这很好用,除非人们通过 Twitter 访问此 URL(从 Hootesuite 客户端发布).显然,在 IE 以外的所有浏览器 other 中都可以正常工作.使用 IE,从 Hootesuite 链接,这不能正确刷新;直接链接就可以了.

                  This works fine, except when people are visiting this url via Twitter (posted from a Hootesuite client). Apparently, in all browsers other than IE this works properly. With IE, from the Hootesuite link, this does not refresh properly; a direct link does.

                  为什么?

                  推荐答案

                  事实证明,因为我们使用的 URL 设置了一个 cookie,而 Hootsuite 创建了一个框架,IE 不会信任第三方 cookie (我们的网站).因此,我在页面中添加了一些 framebuster 代码,并在浏览器是 IE 时触发它立即"发生.代码如下:

                  It turns out that, because the URL we're using sets a cookie, and Hootsuite creates a frame, that IE won't trust the third party cookie (our site). So I've added some framebuster code to the page, and triggered it to happen "immediately" if the browser is IE. Code is below:

                  <meta http-equiv="refresh" content="15;url=<?php echo $url ?>" />
                  <script type="text/javascript">
                  var timeout = 1;
                  if (navigator.userAgent.match(/MSIE/)) { timeout = 1; } else { timeout = 14500; }
                  setTimeout('if (top != self) top.location.replace(self.location.href)', timeout);
                  </script>
                  

                  也许有一天这会帮助其他一些随机用户.

                  Maybe this will help some other random user out there some day.

                  这篇关于PHP 标头(“刷新")问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:增加标题的宽度 下一篇:PHP - 无法修改标头信息

                  相关文章

                    <bdo id='299Sf'></bdo><ul id='299Sf'></ul>
                    <i id='299Sf'><tr id='299Sf'><dt id='299Sf'><q id='299Sf'><span id='299Sf'><b id='299Sf'><form id='299Sf'><ins id='299Sf'></ins><ul id='299Sf'></ul><sub id='299Sf'></sub></form><legend id='299Sf'></legend><bdo id='299Sf'><pre id='299Sf'><center id='299Sf'></center></pre></bdo></b><th id='299Sf'></th></span></q></dt></tr></i><div id='299Sf'><tfoot id='299Sf'></tfoot><dl id='299Sf'><fieldset id='299Sf'></fieldset></dl></div>
                  1. <legend id='299Sf'><style id='299Sf'><dir id='299Sf'><q id='299Sf'></q></dir></style></legend>
                    <tfoot id='299Sf'></tfoot>

                    <small id='299Sf'></small><noframes id='299Sf'>