斜杠附加到我的所有帖子 [英] Slash appended to all my posts

查看:97
本文介绍了斜杠附加到我的所有帖子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

为什么在PHP中启用magic_quotes_gpc被认为是不好的做法?

当我从帖子表单获取信息时,html表单在随机字符前添加了斜杠。例如:hellogeorge变成了hello \george \。

我完全不理解为什么发生这种情况,我试着在输入标签中禁止使用斜杠从JavaScript,但不工作,所以我需要一些PHP或JavaScript函数从服务器中删除此。该函数也必须在html中工作,因为我使用这三种技术,因为我正在开发和销售web 2.0网站。



这个和它的版本的php函数是什么HTML呢?
在此先感谢。



在这里,我将您链接到我的网页,或者您可以查看原因。



http://www.nickersonweb.com/

http://www.preferredmerchantservices.net/

解决方案

特殊字符被转义。您可以使用 http://php.net/manual/en/function.stripslashes删除反斜杠.php


Possible Duplicate:
Why turning magic_quotes_gpc on in PHP is considered a bad practice?

when i get information from a post form, the html form adds slashes before random characters. for example: hello "george" becomes hello \"george\".

I dont understand at all why this happens, I tried already forbidding slashes in the input tag from javascript but does not work so I need some php or javascript function to remove this from the server. The function must work in html too because i am using these three technologies because i am developing and selling web 2.0 sites.

what is the php function for this and its version for html too? thanks in advance.

Here I link you to my pages with this problem, maybe you can check why this happens.

http://www.nickersonweb.com/
http://www.preferredmerchantservices.net/

解决方案

special characters are escaped. you can remove the backslashes with http://php.net/manual/en/function.stripslashes.php

这篇关于斜杠附加到我的所有帖子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆