How to implement 302 jump in php

青灯夜游
Release: 2023-03-12 16:08:01
Original
7367 people have browsed it

Jump method: 1. Use "header('HTTP/1.1 302 Moved Permanently'); header('Location: URL address');" statement; 2. Use "header('Location: URL' ,true,302)" statement.

How to implement 302 jump in php

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

In php, you can use header() to Implement 302 jump.

Method 1:

header('HTTP/1.1 302 Moved Permanently');
header('Location: //m.sbmmt.com');
Copy after login

Method 2:

header('Location: //m.sbmmt.com', true, 302);
Copy after login

One more thing, if you want to adapt HTTPS/HTTP If so, this is enough:

header('Location: //m.sbmmt.com', true, 302);
Copy after login

Recommended study: "PHP Video Tutorial"

The above is the detailed content of How to implement 302 jump in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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