Re: Updating a single line in a file

From: Date: Sat, 18 Mar 2006 19:07:54 +0000
Subject: Re: Updating a single line in a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-232188@lists.php.net to get a copy of this message
On Sat, Mar 18, 2006 at 11:01:07AM +0100, smr78 wrote: > Hi, > What is the best method to update a single line in a text file? > I have a file made of identifiers, that is pointed on by a htaccess file and > used by a server to give access to a web site. > The file content is like this : > login1:pass1\r\n > login2:pass2\r\n > .... > loginn:passn\r\n > loginn1:passn1\r\n > .... > lastlogin:lastpass\r\n Why dont you use a database for this? You will run into race conditions at some point. If you need a file based database take a look at sqlite. Curt. -- cat .signature: No such file or directory

« previous php.general (#232188) next »