append to top of file and reload
Using the basic syntax for appending files:
$filename = "message.txt";
$fp = fopen($filename, "a") or die("couldn't open $filename");
fwrite($fp, "hello, this is testing");
//reload to see new message. how?
The text is appended at the end of whatever is already in message.txt. How can I make it so that it appends at the top of the file instead? So that new messages are at the top.
Also, what is the code to tell the page to reload?
thanks very much.
Last edited by loonatik; 04-07-2003 at 03:15 PM..