php header gbk

来源:互联网 发布:java 节假日api 编辑:程序博客网 时间:2024/05/21 23:00

php header gbk

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