首页
学习
活动
专区
圈层
工具
发布

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'); //设置内容类型

1.2K10
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    T extends Type 、? extends Type ?与? super Type 的意义与区别分析

    在Java泛型中,T extends Type、? extends Type 和 ? super Type 是三种不同的类型约束,它们在用法和含义上有所不同。...以下是对这三种约束的详细解释和比较: T extends Type T extends Type 是在定义泛型类或接口时使用的类型参数约束。它表示泛型类型参数 T 必须是 Type 类型或其子类。...extends Type ? extends Type 是一个通配符类型,用于泛型方法、字段和方法参数。它表示一个未知的类型,这个类型是 Type 类型或其任何子类。...super Type ? super Type 是另一个通配符类型,它表示一个未知的类型,这个类型是 Type 类型或其任何超类(包括 Type 本身)。...extends Type:只能从中读取对象,不能向其中添加对象。 ? super Type:可以向其中添加 Type 类型的对象(及其子类),同时也可以从中读取对象。

    29000
    领券