Initial commit
This commit is contained in:
22
20250103/user_info.php
Normal file
22
20250103/user_info.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
session_start(); // 启用 Session
|
||||
|
||||
// 检查是否登录
|
||||
if (!isset($_SESSION['s_name'])) {
|
||||
echo "未登录!请先登录。";
|
||||
header("Location: login.php"); // 跳转到登录页面
|
||||
exit();
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>用户信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>欢迎, <?php echo htmlspecialchars($_SESSION['s_name']); ?>!</h1>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user