如何在 PHP 中进行重定向?

未结 0 2651
VIP1 2019年09月20日
悬赏:20积分
是否有可能通过使用 PHP 将用户重定向到不同的页面?
假设用户访问了 google www.example.com/page.php ,我想把他们重定向到 google www.example.com/index.php ,如果不使用元信息刷新,该怎么做呢? 这可能吗?
回帖
  • 2019年09月20日 12:45

    <?php
    header('content-type:text/html;charset=uft-8);
    //重定向页面
    header('location:index.php');
    ?>

    0 回复
  • 2019年09月20日 12:45


    <?php
    header('content-type:text/html;charset=uft-8);
    //重定向页面
    header('location:index.php');
    ?>

    0 回复
本周热议
没有相关数据
layui

微信扫码关注 网盟开源 公众号