Home  >  Article  >  Backend Development  >  How to modify response header settings in php

How to modify response header settings in php

coldplay.xixi
coldplay.xixiOriginal
2020-07-29 16:09:163023browse

php method to modify response header settings: 1. Jump function, the code is [header('location:index.php')]; 2. Page refresh, the code is [header('refresh:3; url=index.php')].

How to modify response header settings in php

php method to modify response header settings:

Jump function

header('location:index.php');

Page refresh

header('refresh:3;url=index.php');

Output picture

header('Content-type:image/gif,image/png,image/jpg,image/jpeg');

Download content

header('Content-type:application/octet-stream');

Related learning recommendations: PHP programming from entry to proficiency

The above is the detailed content of How to modify response header settings in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn