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

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

      <tfoot id='CBANP'></tfoot>

      1. codeIgniter 使用 mysql_real_escape_string() 代替.database

        时间:2023-09-24
        <i id='KWBVY'><tr id='KWBVY'><dt id='KWBVY'><q id='KWBVY'><span id='KWBVY'><b id='KWBVY'><form id='KWBVY'><ins id='KWBVY'></ins><ul id='KWBVY'></ul><sub id='KWBVY'></sub></form><legend id='KWBVY'></legend><bdo id='KWBVY'><pre id='KWBVY'><center id='KWBVY'></center></pre></bdo></b><th id='KWBVY'></th></span></q></dt></tr></i><div id='KWBVY'><tfoot id='KWBVY'></tfoot><dl id='KWBVY'><fieldset id='KWBVY'></fieldset></dl></div>

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

              <tbody id='KWBVY'></tbody>
            • <tfoot id='KWBVY'></tfoot>
                  <bdo id='KWBVY'></bdo><ul id='KWBVY'></ul>
                  <legend id='KWBVY'><style id='KWBVY'><dir id='KWBVY'><q id='KWBVY'></q></dir></style></legend>
                  本文介绍了codeIgniter 使用 mysql_real_escape_string() 代替.database 连接问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我在带有数据库的服务器上安装了代码点火器我想在我的 mac 上运行相同的数据库,我使用了 MAMP 并在 htdocs 中复制了项目文件夹,但是我有这个错误请你帮帮我好吗!

                  I have code igniter installed on server with database I want to run the same db on my mac, I used MAMP and I copy the project folder inside htdocs, but I have this error would you please help me!

                  ErrorException [ 8192 ]: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.
                  

                  推荐答案

                  不要害怕改变核心文件,只需改变 FCPATH/system/database/drivers/mysqli/mysqli_driver.php

                  Don't be afraid to change core files, just alter FCPATH/system/database/drivers/mysqli/mysqli_driver.php

                  function escape_str($str, $like = FALSE)
                  {
                      if (is_array($str))
                      {
                          foreach ($str as $key => $val)
                          {
                              $str[$key] = $this->escape_str($val, $like);
                          }
                  
                          return $str;
                      }
                  
                      if (function_exists('mysqli_real_escape_string') AND is_object($this->conn_id))
                      {
                          $str = mysqli_real_escape_string($this->conn_id, $str);
                      }
                      else
                      {
                          $str = addslashes($str);
                      }
                  
                      // escape LIKE condition wildcards
                      if ($like === TRUE)
                      {
                          $str = str_replace(array('%', '_'), array('\%', '\_'), $str);
                      }
                  
                      return $str;
                  }
                  

                  我遇到了同样的问题

                  更好的解决方案 -> https://ellislab.com/forums/viewthread/228288/ 在 github 中声明它将在 CodeIgniter 3.0 中修复该修复已经存在于该存储库中"

                  Better solution -> https://ellislab.com/forums/viewthread/228288/ "stated in github that it will be fixed in CodeIgniter 3.0 the fix already exists in that repository"

                  这篇关于codeIgniter 使用 mysql_real_escape_string() 代替.database 连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将阿拉伯语数据插入mysql数据库 下一篇:PHP:如果 Internet Explorer 6、7、8 或 9

                  相关文章

                  最新文章

                • <legend id='OUFzA'><style id='OUFzA'><dir id='OUFzA'><q id='OUFzA'></q></dir></style></legend>

                • <small id='OUFzA'></small><noframes id='OUFzA'>

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