人物问题...... [英] Character Problem...
问题描述
你好!
我有一个小问题:
我有一个网站,有mySQL-backend,和一个在线
管理系统。
该网站有三种语言:其中一种是德语。
我的问题关注'''''(没有引号),和
可能更多字符。
当管理员在文本字段中输入它时,然后
将其写入数据库,我使用mysql_real_escape_string()
来防止任何错误。当管理员想要编辑
其中带有?的记录时,它在文本字段中显示正确
,但是当有人查看它时通过
常规页面,他们看到& #9 4 6; (没有空格......)。
要在页面中显示DB内容,我使用
htmlentities(stripslashes($ string))。
缺陷在哪里?
提前致谢!
< blockquote> string))。
哪里有缺陷?
提前致谢!
frizzle写道:当管理员想要编辑带有''??''的记录时,它显示的恰好<在文本字段中,但当有人通过常规页面查看时,他们会看到& #9 4 6; (没有空格......)。
$ b $bβ是希腊小写字母
字母beta(?2)的HTML数字表示。如果你想要德文字母??,有人会输入
错误的东西。
- brion vibber(brion @ pobox.com)
好的,我的坏......:
Hi there!
I have (for sofar) a small problem:
I have a site, with mySQL-backend, and an online
admin system.
The site is in three languages: 1 of them is German.
My poblem concerns the ''?'' (without quotes), and
probably more characters.
When an admin enters it in a textfield, and then
writes it into the DB, i use mysql_real_escape_string()
to prevent any mistakes. When an admin wants to edit
the record with the ''?'' in it, it''s displayed just right
in the textfield, but when someone views it through a
regular page, they see & # 9 4 6 ; (without spaces...).
To display DB-contents in a page, i use
htmlentities(stripslashes($string)).
Where is the flaw?
Thanks in advance!
string)).
Where is the flaw?
Thanks in advance!
frizzle wrote:When an admin wants to edit
the record with the ''??'' in it, it''s displayed just right
in the textfield, but when someone views it through a
regular page, they see & # 9 4 6 ; (without spaces...).
β is an HTML numeric representation of the the Greek lowercase
letter beta (?2). If you want the German letter ??, somebody''s typing the
wrong thing in.
-- brion vibber (brion @ pobox.com)
Ok, my bad... :
这篇关于人物问题......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!