<legend id='1WHxc'><style id='1WHxc'><dir id='1WHxc'><q id='1WHxc'></q></dir></style></legend>

    <small id='1WHxc'></small><noframes id='1WHxc'>

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

          <bdo id='1WHxc'></bdo><ul id='1WHxc'></ul>
      1. PHP 对 GET 参数的保护

        PHP protection of GET parameters(PHP 对 GET 参数的保护)
        <i id='LWpRO'><tr id='LWpRO'><dt id='LWpRO'><q id='LWpRO'><span id='LWpRO'><b id='LWpRO'><form id='LWpRO'><ins id='LWpRO'></ins><ul id='LWpRO'></ul><sub id='LWpRO'></sub></form><legend id='LWpRO'></legend><bdo id='LWpRO'><pre id='LWpRO'><center id='LWpRO'></center></pre></bdo></b><th id='LWpRO'></th></span></q></dt></tr></i><div id='LWpRO'><tfoot id='LWpRO'></tfoot><dl id='LWpRO'><fieldset id='LWpRO'></fieldset></dl></div>
              <tbody id='LWpRO'></tbody>
              <tfoot id='LWpRO'></tfoot>
            • <legend id='LWpRO'><style id='LWpRO'><dir id='LWpRO'><q id='LWpRO'></q></dir></style></legend>
                  <bdo id='LWpRO'></bdo><ul id='LWpRO'></ul>
                • <small id='LWpRO'></small><noframes id='LWpRO'>

                  本文介绍了PHP 对 GET 参数的保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  好的考虑这个网址:

                  example.com/single.php?id=21424
                  

                  很明显,PHP 将获取 ID 并通过 mysql 查询运行它以检索 1 条记录以将其显示在页面上.

                  It's pretty obvious to you and i that the PHP is going to take the id and run it through a mysql query to retrieve 1 record to display it on the page.

                  无论如何,是否有一些恶意黑客可能会弄乱这个 url 并对我的应用程序/mysql 数据库构成安全威胁?

                  Is there anyway some malicious hacker could mess this url up and pose a security threat to my application/mysql DB?

                  谢谢

                  推荐答案

                  当然,永远不要认为用户条目(_GET、_POST、_COOKIE 等)是安全的.

                  Of course, never ever ever consider a user entry (_GET, _POST, _COOKIE, etc) as safe.

                  使用 mysql_real_escape_string php 函数来清理你的变量:http://php.net/manual/en/function.mysql-real-escape-string.php

                  Use mysql_real_escape_string php function to sanitize your variables: http://php.net/manual/en/function.mysql-real-escape-string.php

                  关于 SQL 注入:http://en.wikipedia.org/wiki/SQL_injection

                  这篇关于PHP 对 GET 参数的保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

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

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

                            <tbody id='EZAPx'></tbody>
                          <tfoot id='EZAPx'></tfoot>