Methods to implement redirection in php: 1. Use the "header('location:jump address');" statement; 2. Use "echo '';" 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:https://www.php.cn/');
Method 2: meta tag
echo '<meta http-equiv="refresh" content="1;url=https://www.php.cn/">';
Method 3: script tag
echo '<script>window.location.href="https://www.php.cn/"</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!