Home  >  Article  >  Backend Development  >  The easiest way to redirect in PHP

The easiest way to redirect in PHP

WBOY
WBOYOriginal
2016-07-25 09:00:44868browse
The simplest method of php redirection, friends in need can refer to it.

PHP Redirect

<?php
//method1
header("Location: index.php");

//method 2
echo '<scrīpt type="text/javascript">
window.location = "index.php";
</scrīpt>';

//method 3
echo "<META HTTP-EQUIV="Refresh" CONTENT="0; URL=index.php">";
?>

For php redirection, you can also refer to the following articles: Instance analysis of apache php 301 redirect How to implement php 301 redirect How to implement 301 redirect in php Three methods about php page redirection



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