我申请了一个国外的php空间,可是不支持中文,里边的中文全边成了乱码,英文就没事,能不能解决啊?

来源:百度知道 编辑:UC知道 时间:2024/06/23 09:17:39
<a href="http://neess.suprhost.com/index.html" target="_blank">http://neess.suprhost.com/index.html</a>
<br>你们试试
Forbidden是什么意思?

国外的不怎么支持中文的

不会的吧

把你放上文件的地址放上来我给你看看。

他不是不支持中文,而是默认不是中文,你可以在代码中设置中文。

因为服务器的默认设置需要设置为中文才可以自动显示中文,否则会显示乱

码。

使用php,也可以定义php的默认语言.
php.ini中:
default_charset = "gb2312"

养成良好的习惯,在每个网页的<head>;</head>;的最前面加入这行:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">;

使用mysql时
$link = mysql_connect($host,$dbuser,$dbpass) or die('无法连数据库服务器');
mysql_select_db($db,$link) or die('无法连接数据库');
mysql_query('set names gb2312');
//加上这句定义一下中文