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?
>
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
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
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
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
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
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
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
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
9 matches
Mail list logo