久久久久久久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>

                          • 主站蜘蛛池模板: 国产精品久久久99 | 人成精品 | 性色视频| 国产精品毛片一区二区在线看 | 日韩在线精品视频 | 艹逼网| 日韩免费高清视频 | 亚洲高清视频一区二区 | 三级成人在线 | 日韩欧美在线观看 | 久久综合伊人一区二区三 | 黄色免费av | 欧美看片| 日本在线免费看最新的电影 | 国产精品久久久久久久毛片 | 中文字幕高清 | 一级片网站视频 | av网站免费看 | 久久久日韩精品一区二区三区 | 成人一区在线观看 | 高清欧美性猛交 | 欧美精品在线一区二区三区 | 国产精品免费大片 | 人操人人 | 美女在线国产 | 欧美日本一区 | 国产高清一区二区 | 中国美女一级黄色片 | 中日韩毛片| 中文字幕亚洲视频 | 天天插天天干 | 欧美视频第三页 | 欧美日韩国产在线观看 | 亚洲人在线观看视频 | 中文字幕免费 | 18gay男同69亚洲网站 | 国产精品夜夜夜一区二区三区尤 | 色网站在线 | 久久99精品久久久久久噜噜 | 久久成人免费 | 欧美αv |