header()跳转

   if ($toNews == 1) {
            header('Location:/ucenter/pageMailBox/2');
            exit;
        }

PHP跳转页面,用 header() 函数

定义和用法

header() 函数向客户端发送原始的 HTTP 报头。

认识到一点很重要,即必须在任何实际的输出被发送之前调用 header() 函数

原文地址:https://www.cnblogs.com/wanlibingfeng/p/8454792.html