欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

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

程序员文章站 2022-04-26 09:46:52
...
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"); 
相关标签: php PHP header