I have a code that writes information to the top line of a text file, but i want it to write to the bottom line. how can i do this? here is the code i have that writes to the top line:
$filename = "text.php";
$fileAr= file($filename);
$fd = fopen( $filename, "w+" );
$filemessage = "<a href=\"javascript:launcher('profile.php?username=$username');\"><B>$username</B></a>> ";
$filemessage .="<font color=\"$fcolor\">$chat</font><br>\n";
fputs($fd,$filemessage);
$numLines = max(20,count($fileAr));
for ($i=0;$i<$numLines;$i++) {
fputs($fd,$fileAr[$i]);
}
fclose( $fd );
text.php is the file i want the information to be added to the bottom line of... and this code adds the info to the top line. do any of you have a fix?
thank you 😃