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

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

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

        <tfoot id='r32ek'></tfoot>

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

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

        PHP: mysql v mysqli v pdo

        PHP: mysql v mysqli v pdo(PHP: mysql v mysqli v pdo)
          <legend id='wq8n4'><style id='wq8n4'><dir id='wq8n4'><q id='wq8n4'></q></dir></style></legend>
          <i id='wq8n4'><tr id='wq8n4'><dt id='wq8n4'><q id='wq8n4'><span id='wq8n4'><b id='wq8n4'><form id='wq8n4'><ins id='wq8n4'></ins><ul id='wq8n4'></ul><sub id='wq8n4'></sub></form><legend id='wq8n4'></legend><bdo id='wq8n4'><pre id='wq8n4'><center id='wq8n4'></center></pre></bdo></b><th id='wq8n4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='wq8n4'><tfoot id='wq8n4'></tfoot><dl id='wq8n4'><fieldset id='wq8n4'></fieldset></dl></div>
          1. <tfoot id='wq8n4'></tfoot>

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

                    <tbody id='wq8n4'></tbody>
                • <small id='wq8n4'></small><noframes id='wq8n4'>

                • 本文介紹了PHP: mysql v mysqli v pdo的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我一直在閱讀一些關于使用 mysqli 與 pdo 在 php 中使用 mysql 的問題.

                  I've been reading some questions regarding using mysqli versus pdo to use mysql in php.

                  我見過諸如 mysqli 或 PDO 之類的問題 -優點和缺點是什么? 或 從mysql 到 mysqli 或 pdo?,它們都專門處理 mysqli v pdo.我對這兩種方法哪個更好不感興趣.

                  I've seen questions such as mysqli or PDO - what are the pros and cons? or Moving from mysql to mysqli or pdo?, which both deal with mysqli v pdo exclusively. I'm not as much interested as to which of these two methods are better.

                  我想知道為什么應該避免使用 mysql_ 函數.當然,根據 PHP 的文檔,它們正在被棄用 http://php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated,線程 PHP PDO 和 MySQLi 表明 PDO 和 MySQLi 更強大,并且線程 MySQL、MySQLi 和 PDO 有什么區別? 暗示這些較新的方法更安全.

                  I was wondering why mysql_ functions should be avoided. Of course, they're in the process of being deprecated per PHP's documentation http://php.net/manual/en/faq.databases.php#faq.databases.mysql.deprecated, the thread PHP PDO and MySQLi suggests PDO and MySQLi are more poweful, and the thread What is the difference between MySQL, MySQLi and PDO? implies that these newer methods are more secure.

                  總的來說,我想知道 mysql_ 方法的主要弱點是什么,以及避免它的原因是什么(我想更具體地說,不僅僅是因為它已被棄用).我正計劃更新受影響的腳本,并且很好奇為什么不推薦使用這種舊方法.

                  Overall, I'm wondering what are the big weaknesses in the mysql_ methods, and what reasons there are for avoiding it (I guess more specifically than just because it's deprecated). I'm planning to update my affected scripts, and became curious as to why this old method was deprecated.

                  謝謝!

                  推薦答案

                  mysql_query 函數的設計使得你必須小心地轉義你的每一位數據'重新注入它,如果你錯過了一個,你的整個應用程序都可能被自動 SQL 漏洞利用工具破壞.

                  The design of the mysql_query function is such that you've got to be careful to escape each and every bit of data you're injecting into it, and if you miss even one your entire application can be destroyed by an automatic SQL vulnerability exploit tool.

                  mysqli 和 PDO 都支持占位符,必須確保您的查詢不受 SQL 注入錯誤的影響.對所有內容調用 mysql_real_escape_string 不僅乏味,而且容易出錯,這就是問題出現的地方.

                  Both mysqli and PDO support placeholders which are required to ensure that your queries are safe from SQL injection bugs. Calling mysql_real_escape_string on everything is not only tedious, but error-prone, and that's where the problems arise.

                  mysql 函數是 PHP 早期的產物,與 mysqli 作為選項提供的面向對象的新特性相比,它明顯受到更多限制,或 PDO 設計.

                  The mysql functions are a product of the very early days of PHP and are significantly more limited than the new object-oriented features offered by both mysqli as an option, or PDO by design.

                  使用這兩個新接口之一有很多很好的理由,但最重要的是 mysql_query 函數在生產代碼中使用太危險了.有了它,您將永遠遠離一些非常嚴重的問題.

                  There's a number of very good reasons to use one of these two new interfaces, but the most important is that the mysql_query function is simply too hazardous to use in production code. With it you will always be one mistake away from some very serious problems.

                  充滿密碼和信用卡號的數據庫不斷出現是有原因的.擁有一個明顯的 SQL 注入點使得完全接管一個站點幾乎太容易了.

                  There's a reason rips of databases full of passwords and credit card numbers keep showing up. Having an obvious SQL injection point makes it almost too easy to completely take over a site.

                  這篇關于PHP: mysql v mysqli v pdo的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                  Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                  PHP Prepared Statement Problems(PHP 準備好的語句問題)
                  mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                  PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                  How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)

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

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

                    1. <legend id='Psru3'><style id='Psru3'><dir id='Psru3'><q id='Psru3'></q></dir></style></legend>

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

                          2. <i id='Psru3'><tr id='Psru3'><dt id='Psru3'><q id='Psru3'><span id='Psru3'><b id='Psru3'><form id='Psru3'><ins id='Psru3'></ins><ul id='Psru3'></ul><sub id='Psru3'></sub></form><legend id='Psru3'></legend><bdo id='Psru3'><pre id='Psru3'><center id='Psru3'></center></pre></bdo></b><th id='Psru3'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Psru3'><tfoot id='Psru3'></tfoot><dl id='Psru3'><fieldset id='Psru3'></fieldset></dl></div>
                            主站蜘蛛池模板: 97国产精品视频人人做人人爱 | 欧美精品在线一区二区三区 | 日韩视频精品在线 | 欧美一区二区三区精品 | 欧美国产日韩在线观看 | 91av在线免费观看 | 亚洲精品久久久久久久久久久 | 国产一区二区三区四区在线观看 | 国产精品久久久久久久久 | 亚洲成人精品免费 | 亚洲视频在线看 | 黑人粗黑大躁护士 | 日日操网站 | 国产 亚洲 网红 主播 | 久久久一区二区三区四区 | 中文字幕av亚洲精品一部二部 | 亚洲五码在线 | 韩日一区二区三区 | 99久久久久久久 | 在线观看免费黄色片 | 看特级黄色片 | 亚洲五码久久 | 精品亚洲一区二区 | www.97zyz.com| 一区二区免费 | 91福利网址| 青青草在线播放 | 亚洲色图在线观看 | 亚洲精品一区在线观看 | 97国产一区二区 | 中文字幕成人免费视频 | 在线国产一区二区 | 亚洲乱码国产乱码精品精98午夜 | 日韩欧美一区二区在线播放 | 三级免费毛片 | 国产精品久久久久久久久久三级 | 日韩一级精品视频在线观看 | 久久精品国产清自在天天线 | 99re国产视频 | 欧美国产日韩一区 | 全免费a级毛片免费看视频免 |