• <legend id='yuHGj'><style id='yuHGj'><dir id='yuHGj'><q id='yuHGj'></q></dir></style></legend>

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

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

    1. <tfoot id='yuHGj'></tfoot>

      1. 如何获取和更改 URL 变量 PHP

        How to get and change URL variable PHP(如何获取和更改 URL 变量 PHP)
        <i id='vHKPo'><tr id='vHKPo'><dt id='vHKPo'><q id='vHKPo'><span id='vHKPo'><b id='vHKPo'><form id='vHKPo'><ins id='vHKPo'></ins><ul id='vHKPo'></ul><sub id='vHKPo'></sub></form><legend id='vHKPo'></legend><bdo id='vHKPo'><pre id='vHKPo'><center id='vHKPo'></center></pre></bdo></b><th id='vHKPo'></th></span></q></dt></tr></i><div id='vHKPo'><tfoot id='vHKPo'></tfoot><dl id='vHKPo'><fieldset id='vHKPo'></fieldset></dl></div>
          <bdo id='vHKPo'></bdo><ul id='vHKPo'></ul>

          <legend id='vHKPo'><style id='vHKPo'><dir id='vHKPo'><q id='vHKPo'></q></dir></style></legend>

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

                <tbody id='vHKPo'></tbody>

                  <tfoot id='vHKPo'></tfoot>

                  本文介绍了如何获取和更改 URL 变量 PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  谁能帮我解决这个问题我有一个像

                  Hi could anyone help me with this I have a URL like

                  parent/child/a=1&b=2$c=3
                  

                  然后我有一个链接可以向该 URL 添加变量

                  then I have a link that would add variable to that URL

                  <a href="<?php echo $_SERVER["REQUEST_URI"]."&d=test1";?>">LINK 1</a>
                  <a href="<?php echo $_SERVER["REQUEST_URI"]."&d=test2";?>">LINK 2</a>
                  

                  每次我点击链接时,指向 URL 的变量 d 都会像这样继续复制

                  every time I click my link the variable d to URL keep on reproducing like this

                  parent/child/a=1&b=2&c=3&d=test2&d=test2&d=test2&d=test1&d=test1
                  

                  我知道 $_SERVER["REQUEST_URI"] 不断获取当前 URL,这就是我得到该结果的原因.我已经尝试了 $_SERVER[""] 的一些属性.我喜欢的是改变 d 变量值,不知道怎么做.非常感谢任何回复.谢谢!

                  I know that the $_SERVER["REQUEST_URI"] keep getting the current URL that is why I get that result. I have tried the some of properties of $_SERVER[""]. What I like is to change the d variable value, any idea how to do it. Any response is well appreciated.Thanks!

                  推荐答案

                  $query = $_GET;
                  // replace parameter(s)
                  $query['d'] = 'new_value';
                  // rebuild url
                  $query_result = http_build_query($query);
                  // new link
                  <a href="<?php echo $_SERVER['PHP_SELF']; ?>?<?php echo $query_result; ?>">Link</a>
                  

                  这篇关于如何获取和更改 URL 变量 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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 的问题)

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

                  • <tfoot id='xoPr3'></tfoot>

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

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

                        • <legend id='xoPr3'><style id='xoPr3'><dir id='xoPr3'><q id='xoPr3'></q></dir></style></legend>