首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

php中利用header设置content-type和常见文件类型的content-type

php中利用header设置content-type和常见文件类型的content-type 在PHP中可以通过header函数来发送头信息,还可以设置文件的content-type,下面整理了一些常见文件类型对于的...'); //设置一个404头: header('HTTP/1.1 404 Not Found'); //设置地址被永久的重定向 header('HTTP/1.1 301 Moved Permanently...GMT'); //告诉浏览器文档内容没有发生改变 header('HTTP/1.1 304 Not Modified'); //设置内容长度 header('Content-Length: 1234...'); //设置为一个下载类型 header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment...header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past header('Pragma: no-cache'); //设置内容类型

83210
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到
    领券