Re: [PHP] delete file contents before writing?

2002-06-03 Thread hugh danaher
My mistake: Try unlink() then touch() not fopen(). Hugh - Original Message - From: "hugh danaher" <[EMAIL PROTECTED]> To: "php" <[EMAIL PROTECTED]> Sent: Monday, June 03, 2002 12:43 PM Subject: Re: [PHP] delete file contents before writing? >

Re: [PHP] delete file contents before writing?

2002-06-03 Thread hugh danaher
Try unlink("$file_name") then fopen("$file_name","rw") unlink() deletes the whole file from the directory. Hope this helps. Hugh - Original Message - From: "Jas" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, June 03, 200

Re: [PHP] delete file contents before writing?

2002-06-03 Thread Tobyn Baugher
On Mon, 2002-06-03 at 11:37, Jas wrote: > Not sure how I could do this as I could not find a functions on php.net to > allow me to first delete the entire contents of a file "before" writting the > changes supplied by a textarea. Here is what I have thus far: Just fopen a file with the 'w' mode

[PHP] delete file contents before writing?

2002-06-03 Thread Jas
Not sure how I could do this as I could not find a functions on php.net to allow me to first delete the entire contents of a file "before" writting the changes supplied by a textarea. Here is what I have thus far: Page one - Form: Page two - open file and write changes: As of right n

RE: [PHP] delete file contents before writing?

2002-06-03 Thread Naintara Jain
To: [EMAIL PROTECTED] Subject: [PHP] delete file contents before writing? Not sure how I could do this as I could not find a functions on php.net to allow me to first delete the entire contents of a file "before" writting the changes supplied by a textarea. Here is what I

Re: [PHP] delete file contents before writing?

2002-06-03 Thread Jason Wong
On Monday 03 June 2002 23:37, Jas wrote: > Not sure how I could do this as I could not find a functions on php.net to > allow me to first delete the entire contents of a file "before" writting > the changes supplied by a textarea. Here is what I have thus far: [snip] > As of right now it opens

[PHP] delete file contents before writing?

2002-06-03 Thread Jas
Not sure how I could do this as I could not find a functions on php.net to allow me to first delete the entire contents of a file "before" writting the changes supplied by a textarea. Here is what I have thus far: Page one - Form: Page two - open file and write changes: As of right n

RE: [PHP] Delete File Contents?

2001-12-17 Thread Jeremy Allen
ual/en/function.fopen.php fseek() - http://www.php.net/manual/en/function.fseek.php Thanks Jeremy Allen -Original Message- From: Chris [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Delete File Contents? I've created a progra

[PHP] Delete File Contents?

2001-12-17 Thread Chris
I've created a program that runs a process then stores the results to a file on the server. I would like the file to contain only the most recent update, but it seems I can only append to my using fopen. Is there a way to open the file and overwrite the data in that file? I've considered deleting