有没有像''的东西?

问题描述:

我正在使用的系统有一个处理'的bug,是否有'的html格式?有没有像''的东西?

有没有PHP函数来查找这个?

+0

你想接受的答案。如果他们满足.. – 2009-12-29 08:32:42

+0

你确定你的系统有报价的错误,它不只是一个编程错误?它是你的服务器还是客户端的错误? – 2009-12-29 08:35:49

+0

@Mark Byers,在我的客户端。 – user198729 2009-12-29 08:37:39

htmlentities ($string, ENT_QUOTES); 

试试这个:

' 

看到它在行动(不太多看):'

'

看看在HTML page on these codes.

+0

这是否有PHP函数? – user198729 2009-12-29 08:27:20

+1

我不这么认为,谷歌发现这个:http://matthewjamestaylor.com/blog/convert-special-characters-to-html-entities-between-code-tags – monksy 2009-12-29 08:29:03

只是作为参考:http://www.asciitable.com/始终是一个很好的帮助:)

这里是HTML特殊字符参考图表:

http://www.mindflip.com/inet/web/htmlchars.html

您可以尝试'‘查询报价。

’为’和‘为‘

Found from here

您也可以使用'

什么htmlentities()?

+0

不,我试过了,它输出''' 。 – user198729 2009-12-29 08:32:32

Character Entity Number  Entity Name   Description 

    "   "    "   quotation mark 

    '   '    '   apostrophe(does not work in IE) 

    &   &    &   ampersand 

    <   &#60;    &lt;   less-than 

    >   &#62;    &gt;   greater-than 
+0

请注意,它只是',不被广泛​​支持。 – Ms2ger 2009-12-29 10:23:53

+0

我已经提到它在大括号..它不支持IE .. – 2009-12-29 13:17:00