$_GET['search'] = ucfirst(strtolower(str_replace("_"," ",urldecode($_GET['search']))));
由于某些原因,它在字符串中添加了类似于mysqL_escape_string的斜杠,任何人都有任何想法会导致它吗?
答案 0 :(得分:5)
on
中您很可能 magic_quotes_gpc
设置为php.ini
。如果你想避免这种情况,请按以下方式进行检查:
if (get_magic_quotes_gpc())
{
$mytext = stripslashes($your_text);
}
// and your further code....
答案 1 :(得分:1)
检查服务器上是否启用了magic_quotes_gpc。如果启用此选项,PHP将自动从_GET _POST或_COOKIES中删除任何内容。
答案 2 :(得分:1)
听起来magic_quotes_gpc
已启用。您可以使用get_magic_quotes_gpc()
获取设置。