1

我有这个网站 websiteaddress.com,我在显示阿拉伯语文本时遇到了麻烦。阿拉伯语文本仅显示 (?????) 问号。

我与支持人员进行了两次聊天,但到目前为止还没有结果。

这些选项已经过测试,并没有解决问题:

  1. 实际上没有为阿拉伯文本建立数据库连接。所有阿拉伯文本都是静态的,没有数据库条目。因此,数据库编码不是问题。

  2. 该站点基于wordpress,设置中的编码设置为“UTF-8”。还尝试了 ISO-8859-1,两者都给出了相同的结果。(阿拉伯语文本不是来自 wordpress 数据库,它是在主题文件中硬编码的)

  3. 向 UTF-8 和 ISO-8859-1 的 htaccess 添加了一个默认字符集。

  4. 使用带有 UTF-8 编码的 PHP 重新发送标头,还尝试了 ISO-8859-1。

  5. 更改了我的托管根目录以及此特定帐户根目录下的 PHP.INI,并将编码从 ISO 更改为 UTF-8。

所以,以上所有都没有解决问题。

另外,我创建了两个测试页面,里面的文本完全相同(阿拉伯语): websiteaddress.com/test.html 和 websiteaddress.com/test.php .. 都是相同的页面,我只是更改了扩展名文件。html 工作正常并显示阿拉伯语。php 不起作用并显示问号。

基本上是这个问题。

如果有人有任何其他选择让我尝试或知道如何去做,请告诉我!

I have searched alot on stackoverflow and found alot of solutions, mostly all the above solutions were mentioned in some questions on stackoverflow. But, none of them answered my question, hence the post here..

Thanks and have a great day everyone!

4

1 回答 1

1

It was solved by my hosting provider, just in case anyone need this. This is their reply:

I checked the php.ini and the changes were not made in there, so I changed them for you. I also edited the following in your php.ini. exif.encode_unicode I set it to UTF-8 and uncommented it. Now the arabic is rendering at: websiteaddress.com/test.php and websiteaddress.com/test.html You can add the following to your .htaccess to get a different php version rendered. The following code is for 5.3. AddType application/x-httpd-php53 .php

于 2012-12-04T03:24:24.093 回答