我在“$description”中请求的 MySQL 数据库中有一个文本,我想知道\\\\\\\\r\\\\\\\\n
描述中是否存在。所以我得到了:
if(strpos($description, "\\\\\\\\r\\\\\\\\n") !== FALSE) {
echo "String is here.";
} else {
echo "String not found.";
}
但这总是输出“找不到字符串”。\\\\\\\\r\\\\\\\\n
而且我相信搜索到的字符串 ( )中存在错误的转义。我怎样才能通过 strpos \\\\\\\\r\\\\\\\\n
?此外,我可能会结束 str_replace-ing every \\\\\\\\r\\\\\\\\n
with\r\n
因为有人做了一些不好的转义函数和数据到达\\\\\\\\r\\\\\\\\n
而不是\r\n
,所以 str_replace 也面临同样的问题。我可以在任何这些任务(str_pos,str_replace)上使用帮助。
非常感谢你。