//定义编码
header( 'Content-Type:text/html;charset=utf-8 ');
//Atom
header('Content-type: application/atom+xml');
//CSS
header('Content-type: text/css');
//Javascript
header('Content-type: text/javascript');
//JPEG Image
header('Content-type: image/jpeg');
//JSON
header('Content-type: application/json');
header('Content-type: application/pdf');
//RSS
header('Content-Type: application/rss+xml; charset=ISO-8859-1');
//Text (Plain)
header('Content-type: text/plain');
//XML
header('Content-type: text/xml');
// ok
header('>
//ok
header(‘>
header后面首先是冒号,后面的等号是有些头的要求,你写的正确,常见的头还有:
header("refresh:20;url=>
以上就是关于php的header 函数怎么用全部的内容,包括:php的header 函数怎么用、懂php 中的header("location:{$target_url}");进、php的header函数设置在哪等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)