';" statement."/> ';" statement.">

Home >Backend Development >PHP Problem >What is the method to implement redirection in php

What is the method to implement redirection in php

青灯夜游
青灯夜游Original
2022-02-18 18:43:346428browse

Methods to implement redirection in php: 1. Use the "header('location:jump address');" statement; 2. Use "echo '9391681586b3d92bc3e578d44bce25d0';" statement.

What is the method to implement redirection in php

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

What is redirection ?

Redirect is to redirect various network requests to other locations through various methods (such as web page redirection, domain name redirection, routing selection) A change is also a redirection of the path that data packets take).

How to implement redirection in php?

Method 1: header() function

header('location://m.sbmmt.com/');

Method 2: meta tag

echo &#39;<meta http-equiv="refresh" content="1;url=//m.sbmmt.com/">&#39;;

Method 3: script tag

echo &#39;<script>window.location.href="//m.sbmmt.com/"</script>&#39;;

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What is the method to implement redirection 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