Re: [PHP] Updating a single line in a file

2006-03-20 Thread Richard Lynch
Put it all in a database, and write out the file whenever it changes? Only half-joking. Virtually all your problems mentioned go away if it's in a database, and it's not that tricky to set things up so you can write out the file from the db when you need to. On Sat, March 18, 2006 4:01 am,

Re: [PHP] Updating a single line in a file

2006-03-19 Thread smr78
OK, I take a look on sqlite Many thanks Manuel Amador (Rudd-O) [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Replies inlined. 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

[PHP] Updating a single line in a file

2006-03-18 Thread smr78
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

Re: [PHP] Updating a single line in a file

2006-03-18 Thread Curt Zirzow
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 :

Re: [PHP] Updating a single line in a file

2006-03-18 Thread smr78
Curt Zirzow [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] 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

Re: [PHP] Updating a single line in a file

2006-03-18 Thread Manuel Amador (Rudd-O)
Replies inlined. 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. -- About the race conditions, I didn't mentionned I had some extras code to care about concurrent writing on the file