我有这个 php 页面
索引.php
<?php
include 'viewannouncement.php';
?>
查看公告.php
<?php
$result = mysql_query("SELECT announcement_date,announcement_title,
announcement_text FROM sp_announcement") or die(mysql_error());
echo "<table id=\"newspaper-b\">";
echo "<thead>";
echo "<tr>";
echo "<th scope=\"col\">Date</th>";
echo "<th scope=\"col\">Title</th>";
echo "<th scope=\"col\">Announcement</th>";
echo "</tr>";
echo "</thead>";
while($row = mysql_fetch_array( $result )) {
echo "<tr>";
echo '<td>' . $row['announcement_date'] . '</td>';
echo '<td>' . $row['announcement_title'] . '</td>';
echo '<td>' . $row['announcement_text'] . '</td>';
echo "</tr>";
}
echo "</table>";
echo "<br>";
echo "<br>";
?>
在 index.php 中它有一个选项卡,其中包含并查看 viewannouncement.php,问题是当我手动访问子页面时它会留下白屏,我怎样才能让它重定向到 index.php 并且仍然可以通过索引中的选项卡查看.php
我希望你们能帮助我,非常感谢任何帮助