php常用的header:301,302, Redirects, 404, Javascript, Download, Authentication,编码等设置小结

原创
2016-06-20 13:04:51 697浏览

301永久跳转

 


302临时重定向跳转

 



404 Page Not Found:

 



Service not avaliable:

 



CSS样式文件:

 



Javascript header脚本:

 



Images图片输出:

For JPEG(jpg): 
 
For PNG: 
 
For BMP: 
 


PDF文件 (output pdf with php):

 



缓存Cache (force browsers not to cache files):

 



Download dialog下载对话框:

 



Authentication安全验证 (force the browser to pop up a Username/Password input window) - only available when PHP is running as an Apache module:

php header编码

header("Content-type: text/html; charset=utf-8"); 


声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。