php stel de antwoordheader in
1. Stel het bestandstype van de responsheader in
<?php
header('Content-Type:text/css;charset=GBK');//css文件类型,GBK编码
header('Content-Type:text/html;charset=UTF-8');//html文件类型,UTF-8类型
header('Content-Type:text/plain');//纯文件类型,不会做任何解析
header('Content-Type:applcation/javascript');//javascript文件类型
?>2. Redirect (spring naar andere webpagina's)
header('Location:https://www.baidu.com');//跳转到百度网页
?>3. Bestanden downloaden
<?php
header('Content-Type:application/octet-stream');//设置文件下载
header('Content-Disposition:attachment;filename=dome.txt');
?>