php header gb2312
header函数前不能向页面输出任何内容,也就是不能使用echo、print、print_r等函数输出内容
header("Content-type: text/html; charset=gb2312");上面的这句等同于HTML中的<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
完整用法
<?php
header("Content-type: text/html; charset=gb2312");
?>