mysql_real_escape_string() leaving slashes in MySQL

前端 未结 9 1081
囚心锁ツ
囚心锁ツ 2020-12-16 16:41

I just moved to a new hosting company and now whenever a string gets escaped using:

mysql_real_escape_string($str);

the slashes remain in the

9条回答
  •  一整个雨季
    2020-12-16 17:06

    The host that you've moved probably has magic_quotes_runtime turned on. You can turn it off with set_magic_quotes_runtime(0).

    Please turn off magic_quotes_runtime, and then change your code to use bind variables, rather than using the string escaping.

提交回复
热议问题