<small id='2tzya'></small><noframes id='2tzya'>

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

      • <bdo id='2tzya'></bdo><ul id='2tzya'></ul>
    1. <tfoot id='2tzya'></tfoot>
    2. <legend id='2tzya'><style id='2tzya'><dir id='2tzya'><q id='2tzya'></q></dir></style></legend>
      1. mysqli 准备好的语句和 mysqli_real_escape_string

        时间:2023-07-30
        <tfoot id='d6A8K'></tfoot>
      2. <i id='d6A8K'><tr id='d6A8K'><dt id='d6A8K'><q id='d6A8K'><span id='d6A8K'><b id='d6A8K'><form id='d6A8K'><ins id='d6A8K'></ins><ul id='d6A8K'></ul><sub id='d6A8K'></sub></form><legend id='d6A8K'></legend><bdo id='d6A8K'><pre id='d6A8K'><center id='d6A8K'></center></pre></bdo></b><th id='d6A8K'></th></span></q></dt></tr></i><div id='d6A8K'><tfoot id='d6A8K'></tfoot><dl id='d6A8K'><fieldset id='d6A8K'></fieldset></dl></div>
          <tbody id='d6A8K'></tbody>

          • <bdo id='d6A8K'></bdo><ul id='d6A8K'></ul>
          • <legend id='d6A8K'><style id='d6A8K'><dir id='d6A8K'><q id='d6A8K'></q></dir></style></legend>

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

                  本文介绍了mysqli 准备好的语句和 mysqli_real_escape_string的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我目前正在使用 mysqli php 扩展.

                  I'm currently using the mysqli php extension.

                  传统上我使用 mysqli_real_escape_string 来转义用户输入.但是,我正在考虑更改代码(希望以尽可能少的步骤)以使用准备好的语句.

                  Traditionally I have used mysqli_real_escape_string to escape user input. However I am looking at changing over the code (hopefully in as few steps as possible) to use prepared statements.

                  我想清楚这一点 - 如果我使用准备好的语句来绑定我的所有变量,我可以确信 sql 注入是不可能的吗?(并完全免除 mysqli_real_escape_string?)

                  I want to be clear on this - provided I use prepared statements to bind all of my variables, can I be confident that sql injection is impossible? (And dispense completely with mysqli_real_escape_string?)

                  谢谢

                  推荐答案

                  如果您正确绑定所有变量,您可以显着降低 SQL 注入的风险.如果您动态创建 SQL,仍然有可能获得 SQL 注入,例如:

                  If you correctly bind all your variables you can dramatically reduce the risk of SQL injection. It is still possible to get an SQL injection if you create SQL dynamically for example:

                  'SELECT * FROM ' . $tablename . ' WHERE id = ?'
                  

                  但如果你避免这样的事情,你就不太可能遇到问题.

                  But if you avoid things like this it is unlikely you will have problems.

                  这篇关于mysqli 准备好的语句和 mysqli_real_escape_string的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:长文本字段上准备好的 mysqli 选择语句返回空 下一篇:带有 IN(?) 的 mySQL bind_param

                  相关文章

                  最新文章

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

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