Quote:
|
Originally Posted by mdhall
Simpler than you think. Just change the extention on your page from .html to .shtml
.shtml will allow php scripts to be included, and displays the same as the html version.
Thats it.
|
Doesn't seem to be working.
<?php
function ReadFromFile () {
$TheFile = "scroller.txt";
$Open = fopen ($TheFile, "r");
if ($Open) {
$Data = file ($TheFile);
for ($n = 0; $n < count($Data); $n++) {
$GetLine = explode("\t", $Data[$n]);
print ("$GetLine[0]<BR> \n$GetLine[1]<P>\n");
}
fclose ($Open);
print ("<HR><P>\n");
} else {
print ("Unable to read from scroller.txt!<BR>\n");
}
}
ReadFromFile()
?>
On the page it outputs:
\n$GetLine[1]
\n"); } fclose($Open);
print ("
\n"); } else
{ print
("Unable to read from scroller.txt!\n"); }
}
ReadFromFile()