Ecshop屏蔽sql执行错误,防止sql注入

来源:互联网 发布:java培训机构可靠吗 编辑:程序博客网 时间:2024/05/18 01:43

找到 \includes\cls_mysql.php

 

    function ErrorMsg($message = '', $sql = '')    {        if ($message)        {            echo "<b>ECSHOP info</b>: $message\n\n<br /><br />";            //print('<a href="http://faq.comsenz.com/?type=mysql&dberrno=2003&dberror=Can%27t%20connect%20to%20MySQL%20server%20on" target="_blank">http://faq.comsenz.com/</a>');        }        else        {            echo "<b>MySQL server error report:";            print_r($this->error_message);            //echo "<br /><br /><a href='http://faq.comsenz.com/?type=mysql&dberrno=" . $this->error_message[3]['errno'] . "&dberror=" . urlencode($this->error_message[2]['error']) . "' target='_blank'>http://faq.comsenz.com/</a>";        }        exit;    }
注释掉ErrorMsg里面的所有代码,这样很方便的就解决了注入问题。






0 0
原创粉丝点击