为什么我无法从 提交脚本堵塞?
我通过 POST 方法发送所有表单信息,我想直接将它们打印在屏幕上。当我提交
"aaaaaaaaaaaaaaa <b>Hello</b> <script>alert('Hello World')</script>"
到输入块时,我在屏幕上看到打印的“aaaaaaaaaaaaaaa”,然后是粗体“Hello”,就是这样。脚本去哪里?这是PHP实现的保护吗???
I am sending all form info by POST method and I want to directly print them on the screen. And when I submit
"aaaaaaaaaaaaaaa <b>Hello</b> <script>alert('Hello World')</script>"
into the input block then I see on the screen printed "aaaaaaaaaaaaaaa" then bold "Hello" and that's it. Where does script goes? Is it a protection that PHP implements???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
检查您的 PHP 版本和
magic_quotes_gpc
值。它转义所有 REQUEST 数据。该值应为“关闭”。在 PHP 5.3 中,magic_quotes_gpc
已弃用。Check your PHP version and
magic_quotes_gpc
value. It escapes all REQUEST data. This value should be 'Off'. In PHP 5.3magic_quotes_gpc
is deprectaed.php 没有针对这些攻击的本机保护,但站点应该
在实践中实现这些保护,任何恶意代码都将通过 php 脚本
编辑进行转义:
php does not have native protection against these attacks but sites are supposed to implement these protections
in practice any malicious code will be escaped by the php script
edit: