PHP的print()阿拉伯语字符串 [英] PHP print() Arabic string
问题描述
当我尝试和执行这个code打印出来的阿拉伯语字符串:打印(إضافة);
我得到这样的输出:إضاÙØ©
。如果我utf8_de code()它,我会得到 ?????
。我有AddLanguage AR在我的Apache配置,但它并不能帮助。如何打印出这个阿拉伯语字符串?
When I try and execute this code to print out an Arabic string: print("إضافة");
I get this output: إضاÙØ©
. If I utf8_decode() it I'll get ?????
. I have "AddLanguage ar" in my apache configuration but it doesn't help. How do i print out this Arabic string?
推荐答案
同时设置网页语言为utf8例如:
Also set your page language to utf8 eg:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
,然后看它是否工作。如果仍然不工作,去检查了这一点,它是使用PHP阿拉伯语完整的解决方案:
and then see it if worked. If that still doesn't work, go and check this out, it is complete solution for the arabic language using PHP:
<一个href=\"http://www.ar-php.org/en_index_php_arabic.html\">http://www.ar-php.org/en_index_php_arabic.html
您可能想看看这个太:
<一个href=\"http://www.phpclasses.org/browse/package/2875.html\">http://www.phpclasses.org/browse/package/2875.html
这篇关于PHP的print()阿拉伯语字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!