【问题标题】:Php - Remove backslash from MySQLPHP - 从 MySQL 中删除反斜杠
【发布时间】:2013-08-03 09:43:12
【问题描述】:

我正在使用第 3 方 CMS 系统并正在创建一个具有指定打印布局的页面,但是当我返回数据时,我得到了不需要的反斜杠。 IE。 \"Scrutiny Process\" 而不是 "Scrutiny Process"。我知道带斜杠功能,但我将如何在下面使用它?

if ($title = mysql_fetch_array($result))
{
do {printf("%s", $title["page_content"]);}
  while ($title = mysql_fetch_array($result));

提前致谢。

【问题讨论】:

  • 只要把stripslashes放在你从行中提取字符串的任何地方,有什么问题?
  • $title["page_content"]中的日期是否要修改?
  • printf( "%s", stripslashes ($title["page_content"]) )
  • 这一定是我见过的最奇怪的mysql_fetch_*循环...

标签: php mysql stripslashes


【解决方案1】:

使用

 stripcslashes($title["page_content"]);

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-06-16
    • 2016-02-18
    • 2019-12-23
    • 1970-01-01
    • 1970-01-01
    • 2015-03-28
    • 1970-01-01
    相关资源
    最近更新 更多