header函数运用
2016-04-27 16:38
435 查看
header 函数 用于发送原生的 HTTP 头
1 .跳转
1 .跳转
header("Location: http://www.example.com/");[/code]
2.设置编码header("Content-type:text/html;charset=utf-8");
3.下载等等<?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="downloaded.pdf"'); // The PDF source is in original.pdf readfile('original.pdf');
4 可以设置很多http 头header("Cache-Control: no-cache"); header("Pragma: no-cache");
相关文章推荐
- HTML5——地图应用
- js execCommand
- poj3233 矩阵等比数列求和 二分
- Python之numpy
- mysql UTF-8 中文乱码问题
- Sa求法
- iOS如何获取手机的Mac地址
- [文档] TDDL和Diamond的使用(三):TDDL
- 剑指offer:把数组排成最小的数
- 模拟UA实现访问只能在微信上打开的网页
- 设置Linux内核参数 /etc/sysctl.conf
- Python 正则表达式的简单使用示例
- C++实践参考:警察与厨师
- Java发送邮件代码
- git四步骤
- springMVC整合jedis+redis
- 2/3/4G下载频、小区、扇区的概念
- 【目标检测】Faster RCNN算法详解
- <deep learning>读书笔记(一)特征分解与坐标变换
- 秒杀优化总结点