Home > Article > Backend Development > How to implement redirection in php?
php method to implement redirection: 1. [header()] function, the code is [header('location:http://www.baidu.com')]; 2. meta tag, the code is [echo '
php method to implement redirection:
1, header()
function;
header('location:http://www.baidu.com');
2、meta
tag;
echo '<meta http-equiv="refresh" content="1;url=http://www.baidu.com">';
3、script
tag ;
echo '<script>window.location.href="http://www.baidu.com"</script>';
Related learning recommendations: PHP programming from entry to proficiency
The above is the detailed content of How to implement redirection in php?. For more information, please follow other related articles on the PHP Chinese website!