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

    • <bdo id='m3mtA'></bdo><ul id='m3mtA'></ul>
        <tfoot id='m3mtA'></tfoot>

      1. <small id='m3mtA'></small><noframes id='m3mtA'>

        <legend id='m3mtA'><style id='m3mtA'><dir id='m3mtA'><q id='m3mtA'></q></dir></style></legend>
      2. 处理完成后删除 URL 中的 GET 参数(不使用 POST),PHP

        remove GET parameter in URL after processing is finished(not using POST), PHP(处理完成后删除 URL 中的 GET 参数(不使用 POST),PHP)
        <legend id='7F9SL'><style id='7F9SL'><dir id='7F9SL'><q id='7F9SL'></q></dir></style></legend>

                <tbody id='7F9SL'></tbody>
              <tfoot id='7F9SL'></tfoot>
                <bdo id='7F9SL'></bdo><ul id='7F9SL'></ul>

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

                • 本文介绍了处理完成后删除 URL 中的 GET 参数(不使用 POST),PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有这样的网址 http://localhost/join/prog/ex.php

                  当我使用 GET 方法时,url 地址像这样 http://localhost/join/prog/ex.php?name=MEMORY+2+GB&price=20&quantity=2&code=1&搜索=添加

                  When i use GET method the url address like this http://localhost/join/prog/ex.php?name=MEMORY+2+GB&price=20&quantity=2&code=1&search=add

                  我的问题是:所以,我仍然使用 GET 方法,但我想在 GET 方法中处理完成后,我想将 url 返回(删除参数)到 http://localhost/join/prog/ex.php,和以前一样(不使用 POST 方法).我该怎么做?

                  My question is : so, I still use the GET method but I want to after processing in GET method is finished, I want to the url back(remove parameter) into http://localhost/join/prog/ex.php, as previously (not using POST method). How can i do it?

                  推荐答案

                  把它放在你的 HTML 文件 (HTML5) 中.

                  Put this in your HTML file (HTML5).

                  <script>    
                      if(typeof window.history.pushState == 'function') {
                          window.history.pushState({}, "Hide", "http://localhost/join/prog/ex.php");
                      }
                  </script>
                  

                  或者使用例如使用会话的后端解决方案;

                  Or using a backend solution using a session for instance;

                  <?php
                      session_start();
                  
                      if (!empty($_GET)) {
                          $_SESSION['got'] = $_GET;
                          header('Location: http://localhost/join/prog/ex.php');
                          die;
                      } else{
                          if (!empty($_SESSION['got'])) {
                              $_GET = $_SESSION['got'];
                              unset($_SESSION['got']);
                          }
                  
                          //use the $_GET vars here..
                      }
                  

                  这篇关于处理完成后删除 URL 中的 GET 参数(不使用 POST),PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                  Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                  PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                  How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                  get a # from a url in php(从 php 中的 url 获取 #)
                  PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)

                  <small id='6aPNG'></small><noframes id='6aPNG'>

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

                          <tbody id='6aPNG'></tbody>
                          <bdo id='6aPNG'></bdo><ul id='6aPNG'></ul>