php 实现重定向的三种方式

  • header()函数;
header('location:http://www.baidu.com');
  • meta标签;
echo '<meta http-equiv="refresh" content="1;url=http://www.baidu.com">';
  • script标签;
echo '<script>window.location.href="http://www.baidu.com"</script>';

posted on 2019-04-14 17:27  何苦->  阅读(17604)  评论(0编辑  收藏  举报

导航