Home  >  Article  >  Backend Development  >  Post 接收HTML内容数据后显失误

Post 接收HTML内容数据后显失误

WBOY
WBOYOriginal
2016-06-13 10:33:011096browse

Post 接收HTML内容数据后显出错
文本框中的数据


提交过后获取来的数据


看图下面是查看页面源代码,成了这样

表单的中加了这个属性enctype="multipart/form-data"

而且获取出来的数据还不能用 strip_tags() 这个函数不起作用

代码如下

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->$username = array_shift(explode('|||', stripcslashes($_POST["username"])));                echo $username.'<br>';        echo strip_tags($username);


初学者 高手来看看



------解决方案--------------------
没有文件上传的话,把enctype="multipart/form-data"属性去掉吧。
------解决方案--------------------
text用htmlspecialchars_decode()函数把字符实体转换为字符。
------解决方案--------------------
你用的是phpwind?
------解决方案--------------------
没看明白你什么意思,乱用一通各种strip,能描述清楚点吗。
------解决方案--------------------
贴出你的代码

需要注意到:机器不会输出任何未经输入的东西
机器不会出错,出错的只是人
------解决方案--------------------
原装的代码是不会骗人的。肯定是开源产品动了手脚。
------解决方案--------------------
它这么做,主要是为了防止注入!
------解决方案--------------------
探讨

它这么做,主要是为了防止注入!
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