i’m having trouble with this script i made
i want an announcement bar to appear at the top of the page if announcement.txt exists
<html>
<body>
<?
// this is the file to check for
$ourFile = "announcement.txt";
// check for the file
if (file_exists($ourFile))
{
?>
<FONT COLOR="#FF0033"><H2> Announcement </H2></FONT>
<table border="3" bordercolor="#0000FF" background="/images/gradient.jpg" cellspacing=20% width=100%>
<tr>
<td>
<? readfile($ourFile); ?>
</td>
</table>
<?
} else {
echo("")
}
?>
</body>
</html>
heres index.html
<HTML>
<HEAD>
<TITLE>Talcrow Game and Art server</TITLE>
</HEAD>
<BODY>
<? include("announcement.php") ?>
Server is currently undergoing maintenance
</BODY>
</HTML>
content of announcement.txt
this is a test file