I am using PHP 5.2.17 on windows 7 and it is telling me that mysql_real_escape_string() is an undefined function. I was under the impression that it was bui开发者_高级运维lt-in, so I have no idea why it would be undefined. Can anyone explain this and how to fix it?
That mysql_real_escape_string
Docs function is part of an extension, the mysql extension. Install it and you have the function.
Normally PHP on windows already ships with it and you only need to activate it in your php.ini file. See the link above about installing it, it has a section for the windows operating system.
you need the mysql package for php5 also to use this function.
精彩评论