huoshelf(Allul)你好: 我按照你教我的方式改了后,又出现了新的问题:可以显示汉字了。 但与数据库联接的地方出现了警告,在此之前我的数据库内容是可以通过php页面显示的:Warning: mysql_connect(): Access denied for user: '[email protected]' (Using password: YES) in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 8Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 10Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 12 地址 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 18
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
DefaultLanguage zh-cn2)增加:
AddLanguage zh-cn .cn3)AddDefaultCharset ISO-8859-1 改为:
Adddefault Charset off
或者
AddDefaultCharset GB23124)增加(如果没才加)
AddCharset GB2312 .gb2312 .gb 如果还要提供PHP,还要修改: php.ini中:
;default_charset = "gb2312"
注意这里是注释掉此行,做了以上修改,目的是为让浏览器根据网页头中的charset来自动选择语言,这样就可以在同台服务器上提供多种语言的网页服务。 记住:所做修改后,要重起服务器!
我按照你教我的方式改了后,又出现了新的问题:可以显示汉字了。
但与数据库联接的地方出现了警告,在此之前我的数据库内容是可以通过php页面显示的:Warning: mysql_connect(): Access denied for user: '[email protected]' (Using password: YES) in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 8Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 10Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 12
地址 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\Net\while.php on line 18