我使用PHP 5.3版,并试图在我的代码使用mysql_real_escape_string($unescaped_string)
,但我得到的错误:mysql_real_escape_string未定义
Fatal error: Call to undefined function mysql_real_escape_string()
in /var/www/engine/database.php on line 38
我仍然可以连接到数据库但是。为什么不可用?
我正在使用PHP版本5.3。
请告诉我们你的代码 – GBD
尝试函数mysql_escape_string()来代替 – jtheman
@jtheman你为什么要更换提示功能更强大的(即需要服务器配置到账户),更糟的功能(只是简单的字符串替换)? – Vyktor