Tag Archive

The following is a list of all entries tagged with 反斜杠:

PHP处理POST时自动加反斜杠的问题

使用$_POST['input_content']获得的内容会自动在’和”前增加反斜杠。比如POST的内容是: this’s the content 使用$_POST[]获得后会变成: this\’s the content 这对内容插入数据库提供了一些方便。但如果自动增加反斜杠不符合程序员的意图,那么可以通过两种方法解决: stripslashes将反斜杠去掉。 设置php.ini的magic_quotes_gpc为Off