简体   繁体   中英

mysql_real_escape_string not working on windows

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 built-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.

你需要php5的mysql包也可以使用这个功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM