久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='VDv8z'><style id='VDv8z'><dir id='VDv8z'><q id='VDv8z'></q></dir></style></legend>
      <tfoot id='VDv8z'></tfoot>

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

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

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

        傳遞“("和“)"通過 URI 導致 403 錯誤,我

        Passing quot;(quot; and quot;)quot; through a URI causes a 403 error, how can I encode them?(傳遞“(和“)通過 URI 導致 403 錯誤,我該如何對其進行編碼?)
            <i id='W2wRV'><tr id='W2wRV'><dt id='W2wRV'><q id='W2wRV'><span id='W2wRV'><b id='W2wRV'><form id='W2wRV'><ins id='W2wRV'></ins><ul id='W2wRV'></ul><sub id='W2wRV'></sub></form><legend id='W2wRV'></legend><bdo id='W2wRV'><pre id='W2wRV'><center id='W2wRV'></center></pre></bdo></b><th id='W2wRV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='W2wRV'><tfoot id='W2wRV'></tfoot><dl id='W2wRV'><fieldset id='W2wRV'></fieldset></dl></div>

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

              <bdo id='W2wRV'></bdo><ul id='W2wRV'></ul>
                <tbody id='W2wRV'></tbody>

              <tfoot id='W2wRV'></tfoot>
              • <legend id='W2wRV'><style id='W2wRV'><dir id='W2wRV'><q id='W2wRV'></q></dir></style></legend>
                  本文介紹了傳遞“("和“)"通過 URI 導致 403 錯誤,我該如何對其進行編碼?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  (用于 XML HTTP 請求的 JavaScript 和用于執行 SQL 查詢的 PHP.)

                  我正在構建一個執行查詢的網絡應用程序.它使用 XMLHTTP 請求 GET 方法并將查詢傳遞給執行它的 PHP 腳本.在我在其中引入括號 ( ) 之前,它工作正常.

                  這是一個如何工作的例子:

                  函數執行Qry(){qry = document.getElementByID('textarea').value;qryHTTPRequest(encodeURI(qry));//我也試過 encodeURIComponent(qry);}函數 xmlHTTPRequest(qry){//獲取urlFetch = "http://my.url.com/script.php?qry=" + qry;}

                  這是一個快速參考,我知道我的 xmlhttp 請求可以正常工作,因為它可以完成在傳遞其他查詢時需要執行的操作,例如:

                  SELECT * FROM `tableName`

                  工作正常,但是當你嘗試做類似的事情時

                  創建表`new_table`AS(選擇 * FROM `old_table`)

                  然后這是它無法執行的時候,我收到 403 錯誤,所以我認為它與 () 相關,因為我什至在 PHP 本身上嘗試了相同的代碼,而不必通過它并且它起作用了,所以URL編碼過程一定有問題嗎?如果這是問題,是否有編碼這些字符的方法?我假設還有其他字符沒有使用 encodeURI() 方法以及 encodeURIComponent() 進行編碼.提前致謝!

                  解決方案

                  下面應該這樣做:

                  urlFetch = "http://my.url.com/script.php?qry=" + encodeURIComponent(qry).replace(/(/g, "%28").replace(/)/g, "%29");

                  括號在 URI 語法中很奇怪.許多編碼器將它們視為特殊的,即使它們出現在過時標記"產生中.使用常見的 Web 協議(httphttpsmailto)可以安全地將它們編碼為 %28%29 雖然允許 Web 服務器為它們分配特殊含義.您已經在使用 encodeURIencodeURIComponent 所以您已經假設 URL 轉義序列是 UTF-8.

                  來自 RFC 3986:

                  <塊引用>

                  子分隔符!"/$"/&"/'"/("/)"/*"/+"/,"/;"/="

                  ...

                  過時的規則翻譯標記              "-"/"_"/"."/!"/~"/*"/'"/"("/")"

                  (JavaScript for the XML HTTP request and PHP for the execution SQL query.)

                  I'm building a web app that executes queries. It uses the XMLHTTP request GET method and passes a query to a PHP script that executes it. It works fine until I introduce parentheses ( ) in it.

                  Here is an example of how works:

                  function executeQry(){
                  qry = document.getElementByID('textarea').value;
                  qryHTTPRequest(encodeURI(qry));
                  //I've also tried encodeURIComponent(qry);
                  }
                  
                  
                  function xmlHTTPRequest(qry){
                  //fetches 
                  urlFetch = "http://my.url.com/script.php?qry=" + qry;
                   }
                  

                  this is a quick reference, I know that my xmlhttp request works fine because it does what it needs to do when other queries are passed through for example:

                  SELECT * FROM `tableName`
                  

                  works fine, but when you try to do something like

                  CREATE TABLE `new_table`
                  AS (SELECT * FROM `old_table`)
                  

                  Then this is when it won't execute, I get the 403 error so I figured that it's an with the () because I even tried this same code on the PHP itself, without having to pass it through and it worked, so there must be an issue with the URL encoding process right? If this is the issue, is there a method for encoding these characters? I assume there are other characters that don't get encoded with encodeURI() method as well as the encodeURIComponent(). Thanks in advance!

                  解決方案

                  The below should do it:

                  urlFetch = "http://my.url.com/script.php?qry=" + encodeURIComponent(qry)
                      .replace(/(/g, "%28").replace(/)/g, "%29");
                  

                  Parentheses are oddballs in the URI grammar. Many encoders treat them as special even though they only appear in the obsolete "mark" production. With common web protocols (http, https, mailto) it is safe to encode them to %28 and %29 though web servers are allowed to assign special meanings to them. You are already using encodeURI or encodeURIComponent so you are already assuming that URL escape sequences are UTF-8.

                  From RFC 3986:

                  sub-delims    "!" / "$" / "&" / "'" / "(" / ")"
                              / "*" / "+" / "," / ";" / "="
                  

                  ...

                  obsolete rule     translation
                  mark              "-" / "_" / "." / "!" / "~" / "*" / "'"
                                  / "(" / ")"
                  

                  這篇關于傳遞“("和“)"通過 URI 導致 403 錯誤,我該如何對其進行編碼?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                  JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                  XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)

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

                    • <bdo id='pAm11'></bdo><ul id='pAm11'></ul>

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

                        <tfoot id='pAm11'></tfoot>

                              <tbody id='pAm11'></tbody>
                          • <legend id='pAm11'><style id='pAm11'><dir id='pAm11'><q id='pAm11'></q></dir></style></legend>

                          • 主站蜘蛛池模板: 亚洲成人精品免费 | 成人免费网站在线 | 欧美一级片 | 国产精品极品美女在线观看免费 | 国产精品亚洲综合 | 国产一区二区三区四区五区加勒比 | 在线视频 亚洲 | 国产精品夜间视频香蕉 | www.黄色在线观看 | 毛片大全| 精品成人佐山爱一区二区 | 国产精品一区二区在线免费观看 | 中文字幕在线第二页 | 欧美一区二区三区视频在线 | 国产精品久久一区二区三区 | 久久久久久国产免费视网址 | 免费同性女女aaa免费网站 | 国产高清视频在线观看 | 精品久久久久久18免费网站 | 精品色 | 欧美天堂| 国产一区亚洲二区三区 | av大片| 欧美日韩三级视频 | 亚洲欧美一区二区三区国产精品 | 超碰免费在线 | 久久中文免费视频 | 中文字幕不卡 | 天天爱综合| 夜夜爽99久久国产综合精品女不卡 | 亚洲综合色网站 | 亚洲国产精品区 | 久久久91精品国产一区二区三区 | 夜夜骑综合 | 国产日韩一区二区三区 | 伊人精品在线 | 国产高清一区二区三区 | 伊人精品一区二区三区 | 华丽的挑战在线观看 | 91视频国产一区 | 国产一区免费视频 |