电子邮件中的 PHP 数据清理
我的 PHP 脚本接收信息(来自用户提交的表单)并(几乎)立即作为电子邮件发送。我应该对数据进行什么样的清理?
我想确切地知道使用哪个 PHP 函数来清理数据。
My PHP scripts recieves information (from a user submitted form) and sends it (almost) straight away as an email. What kind of sainitization should I do on the data?
I want to know exactly which PHP function to use to sanitize the data.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您需要:
You'll want to:
您需要阅读有关电子邮件注入的内容。看看这里:
http://www.damonkohler.com/2008/12/电子邮件注入.html
You need to read up on email injection. Take a look here:
http://www.damonkohler.com/2008/12/email-injection.html
查看 PHP 数据过滤。有很多内置的 php 函数可用于数据验证和清理。
Have a look at PHP Data Filtering. There are a lots of built in php functions which can be used for data validation and sanitization.