我做了一个网站头,存在inc_header.php里,内容如下<div style="height:233px; width:960px; margin:auto; background-image:url(../img/Titleimg.png); background-position:center; background-repeat:no-repeat; z-index:-1;">
<table style="position:relative; top:135px; left:280px; font-size:24px">
<tr>
<td>
<a>首页</a>
<a>作业</a>
<a>课堂小册</a>
<a>教学日历</a>
</td>
</tr>
</table>
</div>
然后我在主页(studenthomepage.php)中包含inc_header.php,主页的编码是bgk,如下<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<?php session_start()?>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
</head><body><?php include('inc_header.php');?><table width="960px" border="1" align="center">
..
..
..
</table>
</body>
结果出现了乱码,inc_header中的“首页”“作业”“课堂小册”“教学日历”这几个字未能正确显示,请问如何解决?
<table style="position:relative; top:135px; left:280px; font-size:24px">
<tr>
<td>
<a>首页</a>
<a>作业</a>
<a>课堂小册</a>
<a>教学日历</a>
</td>
</tr>
</table>
</div>
然后我在主页(studenthomepage.php)中包含inc_header.php,主页的编码是bgk,如下<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<?php session_start()?>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
</head><body><?php include('inc_header.php');?><table width="960px" border="1" align="center">
..
..
..
</table>
</body>
结果出现了乱码,inc_header中的“首页”“作业”“课堂小册”“教学日历”这几个字未能正确显示,请问如何解决?
谢谢关注,结贴给分。