Describes how to implement PHP redirection web pages. For beginners, Method 1 of redirecting a PHP webpage: send an http header to the page to redirect the following referenced content :? Php $ GoToindex. php; if the target link here is for beginners,
PHP redirection webpage Method 1:
Send an http header to the page to redirect the following referenced content:
- Php
- $ GoTo = "index. php ";
- // If the target link here is taken from the database, dynamic redirection is achieved.
- Header (sprintf ("Location: % s", $ GoTo ));
- ?>
PHP redirection webpage Method 2:
Use javascript scripts to redirect pages
Reference content is as follows:
- < ?php
- echo "
- < script>window.location =
- "$PHP_SELF";
- < /script>";
- ?>
PHP redirection webpage method 3:
Use html meta tags to redirect pages
Reference content is as follows:
- < ?php
- echo "
-
- "Refresh" CONTENT="0;
- URL=index.php"
- >";
- ?>
Method 1: send an http header to the page to redirect the following reference content :? Php $ GoTo = index. php; // if the target link here...