有人可以为数据库交互推荐一些简单安全的PHP / MySQL数据库类吗?
Here at work we use PDO for that kind of things. Clear enough imho
你也可以使用mysqli类:)
Check out MDB2....
All extensions (mysql, mysqli, pdo_mysql) are safe, if you use them correctly!
We use PDO, though, which appears to be the easiest one: http://php.net/manual/en/book.pdo.php Just remember to use prepared statements (which are "100% safe" against SQL Injections, when used correctly). If you can't use them, at least use methods like PDO::quote().
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.