RE: [PHP] Fwrite Function

From: Date: Sat, 16 Feb 2008 13:50:06 +0000
Subject: RE: [PHP] Fwrite Function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269408@lists.php.net to get a copy of this message
Its a text file and so doesn't support markup. You could write out html into the file that does mark it up and could be displayed to the user via the browser...or you could use regex or str_replace to mark up certain text on the read of the file to display to the user bastien ---------------------------------------- > Date: Sat, 16 Feb 2008 14:03:26 +0200 > From: yuval.schwartz@gmail.com > To: php-general@lists.php.net > Subject: [PHP] Fwrite Function > > Hello, > > Can you please help me, I am writing code where I create a file and write to > it from a form on a webpage and then read and display this file on the > webpage. > I want to change the color of the text that is written to the file. > Do you know how I can do this? > > This is some of my code if you need clarification: > * $boardFile = "MessageBoard.txt"; > $boardFileHandle = fopen($boardFile,'a') or die("can't open file"); > fwrite($boardFileHandle, $name); > fwrite($boardFileHandle, $talk); > fclose($boardFileHandle); > } > $boardFile = "MessageBoard.txt"; > $boardFileHandle = fopen($boardFile,"r"); > $talkR = fread($boardFileHandle, filesize($boardFile)); > fclose($boardFileHandle); > echo $talkR;* > ** > ** > Thanks _________________________________________________________________

« previous php.general (#269408) next »