// === 未登录直接跳转到百度 === if (!isset($_SESSION['user_id'])) { header('Location: https://www.baidu.com'); exit; }