84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
对于php中的处理数据的流程?
数据存mysql前,需要做哪些处理?安全一些呢,从mysql读出数据后,还要做哪些处理? 请指点。发表一下你的看法。
闭关修行中......
以上做法包括不限于使用PHP。 在PHP中防SQL注入的方法推荐使用 Pdo prepare 语法并设置:$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
在PHP中防 XSS 一般使用 htmlspecialchars 处理用户输入的字段。另外,单靠这个是不够的,还需要对 img 的 src 等做处理。
使用php的pdo_mysql扩展 不仅在性能上优势明显 就是安全性,从此不必在为sql注入烦恼 会非常智能的根据字符集对特殊字符quota 你需要做的就是写好sql,prepare, exec,
http://www.piaoyi.org/php/PDO-Mysql-SQL-injection.html
请阅读此文体会
以上做法包括不限于使用PHP。
在PHP中防SQL注入的方法推荐使用 Pdo prepare 语法并设置:$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
在PHP中防 XSS 一般使用 htmlspecialchars 处理用户输入的字段。另外,单靠这个是不够的,还需要对 img 的 src 等做处理。
使用php的pdo_mysql扩展
不仅在性能上优势明显
就是安全性,从此不必在为sql注入烦恼
会非常智能的根据字符集对特殊字符quota
你需要做的就是写好sql,prepare, exec,
http://www.piaoyi.org/php/PDO-Mysql-SQL-injection.html
请阅读此文体会