Dss.Lexius Posted June 12, 2010 Share Posted June 12, 2010 Hi, what i wanted to do is Write a Line on main page in a loop. The line 'll contain the number of line, i mean how many times it has been running with local server time and date. For example: $x = true; While $x { write a line with the date, time and count of itself in loop and append at the end of line. } i hope u got what i am asking for... Thanx Link to comment https://forums.phpfreaks.com/topic/204553-write-a-new-line-in-loop-and-always-new-information-append-at-the-end-of-line/ Share on other sites More sharing options...
sspoke Posted June 12, 2010 Share Posted June 12, 2010 gotta use javascript for that because otherwise it will display when script is over if u don't want loop to stop? time and date always gonna be same Link to comment https://forums.phpfreaks.com/topic/204553-write-a-new-line-in-loop-and-always-new-information-append-at-the-end-of-line/#findComment-1071085 Share on other sites More sharing options...
Dss.Lexius Posted June 12, 2010 Author Share Posted June 12, 2010 i will use Sleep(600) Link to comment https://forums.phpfreaks.com/topic/204553-write-a-new-line-in-loop-and-always-new-information-append-at-the-end-of-line/#findComment-1071093 Share on other sites More sharing options...
ignace Posted June 12, 2010 Share Posted June 12, 2010 Use the a-flag to append lines. $file = fopen('file.txt', 'a+'); fwrite($file, 'hello'); fwrite($file, ' world'); echo fread($file);// hello world fclose($file); Link to comment https://forums.phpfreaks.com/topic/204553-write-a-new-line-in-loop-and-always-new-information-append-at-the-end-of-line/#findComment-1071097 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.