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

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

        标头位置相对路径兼容性

        Header Location relative path compatibility(标头位置相对路径兼容性)

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

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

                  <tfoot id='aGRkE'></tfoot>

                1. 本文介绍了标头位置相对路径兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  这个相对位置 html 标头是否与所有平台的所有浏览器绝对兼容?有什么标准吗?

                  Is this relative location html header absolutely compatible with all browsers at all platforms? Any standards ?

                  Location: some_script.php?la=2&po=2030
                  

                  我的意思是,它是否总是重定向到当前目录的 some_script.php?

                  I mean, will it always redirect to some_script.php at the current dir or not?

                  推荐答案

                  标准是这样的:

                  header('Location: http://www.mywebsite.com/yourpage.php?id=32', TRUE, 302);
                  

                  但要回答您的问题,是的,如果您不首先输入斜杠或完整的 URL,它将重定向到当前文件夹中的页面 X.

                  But to answer your question, yes it will redirect to the page X in the current folder if you don't put a slash at first or a complete URL.

                  我建议您为您所做的每个网站都这样做.在您的主文件(您使用的主 php 文件,如 config 或其他文件)中,创建类似的内容:

                  Here's an idea I would suggest you do for every website you do. In your primary file (the main php file you use like config or whatever), create something like that :

                  define('URL', 'http://www.mywebsite.com/');
                  

                  因此,当您创建重定向、链接或其他内容时,您可以这样做:

                  So when you create a redirection, a link or whatever, you do this :

                  header('Location: '.URL.'yourpage.php?id=32', TRUE, 302);
                  

                  2017 年 11 月.正如下面 @jordanbtucker 所指出的,HTTP 规范已在 2014 年 6 月更新(这篇文章来自 2012 年),以允许在 Location 标头中使用相对 URI.

                  November 2017. As pointed by @jordanbtucker below, the HTTP spec has been updated in June 2014 (this post is from 2012) to allow relative URIs in the Location header.

                  这篇关于标头位置相对路径兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                2. <legend id='PAOEI'><style id='PAOEI'><dir id='PAOEI'><q id='PAOEI'></q></dir></style></legend>
                  <i id='PAOEI'><tr id='PAOEI'><dt id='PAOEI'><q id='PAOEI'><span id='PAOEI'><b id='PAOEI'><form id='PAOEI'><ins id='PAOEI'></ins><ul id='PAOEI'></ul><sub id='PAOEI'></sub></form><legend id='PAOEI'></legend><bdo id='PAOEI'><pre id='PAOEI'><center id='PAOEI'></center></pre></bdo></b><th id='PAOEI'></th></span></q></dt></tr></i><div id='PAOEI'><tfoot id='PAOEI'></tfoot><dl id='PAOEI'><fieldset id='PAOEI'></fieldset></dl></div>
                      <tbody id='PAOEI'></tbody>
                      <tfoot id='PAOEI'></tfoot>

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

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