Re: URGENT! Regarding file writing

From: Date: Tue, 13 Feb 2001 22:56:57 +0000
Subject: Re: URGENT! Regarding file writing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39521@lists.php.net to get a copy of this message
Did you try taking the line you wanted to change and doing a minus one to get the right line number? Not sure why windows won't change the file. I'm assuming you have the proper permissions to do what your trying to do? whatever wrote:
Hi! I would like to know how to overwrite line in file which matches certain condition. Best thing i managed so far is to write line AFTER the line i wanted to overwrite under Linux. No such luck under Win2000 which refuses to write anything to a file but file date/time property has been changed. File is open using $fp=fopen("$file", "r+"); Writing is done using fputs or fwrite($fp, $data); In question is PHP standalone executable. Version i 4.0.3pl1(win2000) and 4.0.0(linux) Any suggestions are welcome. 10x Nemanja NOTE: My email is incorrect. Please remove nospam part.


« previous php.general (#39521) next »