Home  >  Article  >  Backend Development  >  php+mysql怎么不转义原样保存内容

php+mysql怎么不转义原样保存内容

WBOY
WBOYOriginal
2016-06-13 11:42:371005browse

php+mysql如何不转义原样保存内容

本帖最后由 ycyuyuan 于 2013-12-10 20:48:07 编辑 不知php+mysql保存或更新数据库里的记录时有没有可以不使用sql的方式,如果要使用sql考虑内容有特殊字符或SQL注入就要转义保存吧,问一下有没有不用转义原样保存的方法(同时没有SQL注入漏洞)

一般需要原样保存的东西:
比如要保存一段很长的随机生成的密钥
保存一段代码片段
保存php文件到数据库
保存自己写的技术文章
保存新闻……
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn