我正在转义从这样的 php 表单收到的所有字符串参数:
$usr_name = mysql_real_escape_string($_REQUEST['usr_name']);
以避免 SQL 注入的一些问题。但是当我从函数中返回字符串时,我什么都没有。
此外,我的 PHP 日志中不断收到这个奇怪的警告:
PHP Warning: mysql_real_escape_string() [<a href='function.mysql-real-escape-string'>function.mysql-real-escape-string</a>]: A link to the server could not be established in /hermes/bosweb/web279/b2798/ipw.bankingforms/public_html/formAckResponse_controller.php on line 39
主机使用:PHP 版本 4.4.7