php页面不显示阿拉伯文本 [英] php page not displaying arabic text

查看:138
本文介绍了php页面不显示阿拉伯文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个PHP页面,我试图显示阿拉伯文本,但它的显示。

I have a PHP page where I am trying to display Arabic text but its showing.

在MySQL数据库中我成功地存储阿拉伯文本。

In MySQL database I'm storing arabic text successfully.

我使用以下代码连接到数据库:

I'm using the following code to connect to the database :

function connect(){
$this->dbLink = mysql_connect($this->dbHost,$this->dbUser,$this->dbPass);   
if(!$this->dbLink) die("Could not connect to database. " . mysql_error());
mysql_select_db($this->dbName);
mysql_set_charset("utf8", $this->dbLink); 
}

并在PHP页面中使用以下标题:

And using the following header in the PHP page :

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

但尚未成功。

推荐答案

您可以使用此元代码:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

请检查mysql列的字符类型。

And please check mysql column's character type..

查看

这篇关于php页面不显示阿拉伯文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆