【发布时间】:2014-12-24 22:09:12
【问题描述】:
我正在制作一个脚本,它将与 phpVMS 的登录系统集成。
我已经让它工作了,如果有人进入登录页面,它就会显示。我怎样才能使它在有人打开网页但未登录时将其发送到登录页面?
目前,我收到错误:
无法修改标头信息 - 标头已由 /home/a4366948/public_html/mindfulhacker/private/man/index 中的(输出开始于 /home/a4366948/public_html/mindfulhacker/private/man/index.html:11)发送.html 第 16 行
我看到另一篇关于同样问题的帖子,但我对如何让样式表同时工作感到困惑 - 只有一个未格式化的页面是没有意义的!
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="en-gb">
<meta name="language" content="eng">
<meta name="resource-type" content="document">
<link rel="stylesheet" href="style.css" type="text/css">
<title>Management System || CCVG</title>
<?php include('/home/a4366948/public_html/core/codon.config.php'); ?>
</head>
<body>
<div class="container">
<div class="pagetitle">CapitalConnect Virtual Group - Management System</div>
<?php
if(Auth::LoggedIn()) {
?>
<div class="menu"><table class="tb_blue_full margin_10" align="center" border="0" cellpadding="0" cellspacing="0" width="780"><tbody><tr><td class="cell_blue_botright" height="25" width="260"><div align="center"><strong><a href="/home/login_sso.php">Away Status</a></strong></div></td><td class="cell_blue_botright" height="25" width="260"><div align="center"><strong><a href="/home/status.php">Students</a></strong></div></td><td class="cell_blue_bot" height="25" width="260"><div align="center"><strong><a href="/bookings/calendar.php">Classes</a></strong></div></td></tr></tbody></table></div>
<?php
} else {
header("Location: ".url('/login'));
exit;
}
?>
<div style="clear: both;"> </div>
</div>
</body></html>
【问题讨论】: