';" statement."/> ';" statement.">
Home >Backend Development >PHP Problem >What is the method to implement redirection in php
Methods to implement redirection in php: 1. Use the "header('location:jump address');" statement; 2. Use "echo '9391681586b3d92bc3e578d44bce25d0';" statement.
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 '<meta http-equiv="refresh" content="1;url=//m.sbmmt.com/">';
Method 3: script tag
echo '<script>window.location.href="//m.sbmmt.com/"</script>';
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!