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

How to modify response header settings in php

coldplay.xixi
Release: 2023-03-03 13:56:01
Original
3119 people have browsed it

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');
Copy after login

Page refresh

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

Output picture

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

Download content

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

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template