pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="p55dlbj" 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="hf5xjzb" 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="trjdlxf" 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>

                          • 主站蜘蛛池模板: 同学聚会纪念册制作_毕业相册制作-成都顺时针宣传画册设计公司 | 清水混凝土修复_混凝土色差修复剂_混凝土色差调整剂_清水混凝土色差修复_河南天工 | 成都租车_成都租车公司_成都租车网_众行宝 | 高压无油空压机_无油水润滑空压机_水润滑无油螺杆空压机_无油空压机厂家-科普柯超滤(广东)节能科技有限公司 | 济南品牌包装设计公司_济南VI标志设计公司_山东锐尚文化传播 | 全自动五线打端沾锡机,全自动裁线剥皮双头沾锡机,全自动尼龙扎带机-东莞市海文能机械设备有限公司 | 回转支承-转盘轴承-回转驱动生产厂家-洛阳隆达轴承有限公司 | 阴离子_阳离子聚丙烯酰胺厂家_聚合氯化铝价格_水处理絮凝剂_巩义市江源净水材料有限公司 | 广州工业氧气-工业氩气-工业氮气-二氧化碳-广州市番禺区得力气体经营部 | 动库网动库商城-体育用品专卖店:羽毛球,乒乓球拍,网球,户外装备,运动鞋,运动包,运动服饰专卖店-正品运动品网上商城动库商城网 - 动库商城 | 智慧食堂_食堂管理系统_食堂订餐_食堂消费系统—客易捷 | 消防设施操作员考试报名时间,报名入口,报考条件 | 新能源汽车电机定转子合装机 - 电机维修设备 - 睿望达 | 政府回应:200块在义乌小巷能买到爱情吗?——揭秘打工族省钱约会的生存智慧 | 济南玻璃安装_济南玻璃门_济南感应门_济南玻璃隔断_济南玻璃门维修_济南镜片安装_济南肯德基门_济南高隔间-济南凯轩鹏宇玻璃有限公司 | 膜片万向弹性联轴器-冲压铸造模具「沧州昌运模具」 | 石英陶瓷,石英坩埚,二氧化硅陶瓷-淄博百特高新材料有限公司 | 打包钢带,铁皮打包带,烤蓝打包带-高密市金和金属制品厂 | 电解抛光加工_不锈钢电解抛光_常州安谱金属制品有限公司 | 自动化改造_智虎机器人_灌装机_贴标机-上海圣起包装机械 | 深圳成考网-深圳成人高考报名网 深圳工程师职称评定条件及流程_深圳职称评审_职称评审-职称网 | 环讯传媒,永康网络公司,永康网站建设,永康小程序开发制作,永康网站制作,武义网页设计,金华地区网站SEO优化推广 - 永康市环讯电子商务有限公司 | 爆炸冲击传感器-无线遥测传感器-航天星百科 | 碳化硅,氮化硅,冰晶石,绢云母,氟化铝,白刚玉,棕刚玉,石墨,铝粉,铁粉,金属硅粉,金属铝粉,氧化铝粉,硅微粉,蓝晶石,红柱石,莫来石,粉煤灰,三聚磷酸钠,六偏磷酸钠,硫酸镁-皓泉新材料 | 南京蜂窝纸箱_南京木托盘_南京纸托盘-南京博恒包装有限公司 | 水压力传感器_数字压力传感器|佛山一众传感仪器有限公司|首页 | 退火炉,燃气退火炉,燃气热处理炉生产厂家-丹阳市丰泰工业炉有限公司 | 开锐教育-学历提升-职称评定-职业资格培训-积分入户 | 体感VRAR全息沉浸式3D投影多媒体展厅展会游戏互动-万展互动 | 欧景装饰设计工程有限公司-无锡欧景装饰官网 | 高压无油空压机_无油水润滑空压机_水润滑无油螺杆空压机_无油空压机厂家-科普柯超滤(广东)节能科技有限公司 | 便携式高压氧舱-微压氧舱-核生化洗消系统-公众洗消站-洗消帐篷-北京利盟救援 | 菲希尔FISCHER测厚仪-铁素体检测仪-上海吉馨实业发展有限公司 | 理化生实验室设备,吊装实验室设备,顶装实验室设备,实验室成套设备厂家,校园功能室设备,智慧书法教室方案 - 东莞市惠森教学设备有限公司 | 钢衬玻璃厂家,钢衬玻璃管道 -山东东兴扬防腐设备有限公司 | 玻璃钢格栅盖板|玻璃钢盖板|玻璃钢格栅板|树篦子-长沙川皖玻璃钢制品有限公司 | 精密光学实验平台-红外粉末压片机模具-天津博君 | 代办建筑资质升级-建筑资质延期就找上海国信启航 | 中山市派格家具有限公司【官网】| 威实软件_软件定制开发_OA_OA办公系统_OA系统_办公自动化软件 | 次氯酸钠厂家,涉水级次氯酸钠,三氯化铁生产厂家-淄博吉灿化工 |