replacing a line in a file

From: Date: Tue, 13 Mar 2001 23:29:43 +0000
Subject: replacing a line in a file
Groups: php.general 
Request: Send a blank email to php-general+get-43730@lists.php.net to get a copy of this message
having problems replacing a line in a file. need to search the whole document for a string and then replace that line with a string. any ideas? this is causing lots of problems now. $fpoint3 = fopen ($testshadow, "r+") or die("couldnt open shadow file again"); $contents = fread ($fpoint3, $shadowfilesize); fputs ($fpoint3, ereg_replace("$data[0]:$shadow[1]", "$data[0]:$data[1]", $contents)); fclose ($fpoint3); any ideas? <-----CoreComm-Internet-Services---http://core.com-----> (Jon Marshall CoreComm Services Chicago) (jonathon.marshall@core.com Systems Engineer II) (enthalpy@core.com Network Operations) <-----Enthalpy.org-------------http://enthalpy.org-----> (enthalpy@enthalpy.org The World of Nothing) <------------------------------------------------------>

« previous php.general (#43730) next »