mysql_real_escape_string 还是 addslahes ?

解决方案 »

  1.   

    addslahes是什么?LZ想说的是addslashes吧
      

  2.   

    我使用的是:mysql_real_escape_string 。转义 SQL 语句中使用的字符串中的特殊字符,并考虑到连接的当前字符集 
      

  3.   

    为什么我用 mysql_real_escape_string 时 会提示错误?
      

  4.   

    Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in F:\VertrigoServ\www\test.php on line 3Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in F:\VertrigoServ\www\test.php on line 3
      

  5.   

    我只是用了 mysql_real_escape_string() 函数而已 , 没有连接数据库啊!
      

  6.   

    写之前用mysql_real_escape_string()
    php.ini 里的magic_quotes_gpc = On ,改了么!!