// 查询总条数
$total_count = intval(xiu_query('select count(1)
FROM users
where ' . $where)[0][0]);
if (empty($total_count)) {
$GLOBALS['message'] = '没有符合条件信息';
header('Location: /admin/job.php?p=1');
}
本来 当数据查询没有 是 会调到空白页面
之后我进行if判断 让他没有数据 就回到开始页面 但设置的 $GLOBALS['message'] 没有
开始页面中
<?php if (isset($message)) : ?>
<div class="alert alert-danger">
<strong>错误!</strong><?php echo $message; ?>
</div>
<?php endif; ?>
错误部分永远没有
你都用header跳转了,不相当于又重新运行了一遍程序,当然$message未定义了