Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread Ashley Sheridan
On Tue, 2010-06-15 at 16:23 +0530, cheran krishnamoorthy wrote: > You can't use regular expression with unlink directly. > have a look on this > http://www.phpfreaks.com/forums/index.php?topic=256367.0 > > Regards > Cherankrish > > On Tue

Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread cheran krishnamoorthy
You can't use regular expression with unlink directly. have a look on this http://www.phpfreaks.com/forums/index.php?topic=256367.0 Regards Cherankrish On Tue, Jun 15, 2010 at 4:17 PM, Shaun Thornburgh < shaunthornbu...@hotmail.com> wrote:

Re: [PHP] Delete File With Any File Extension

2010-06-15 Thread Adrian
Use glob() to get a list of matching afiles nd then unlink() them separately. > I need to delete a file with any file extension where i know the > name of the file, is it possible to use regular expressions with the unlink > function? -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] delete file

2005-03-24 Thread Richard Davey
Hello William, Thursday, March 24, 2005, 2:08:13 PM, you wrote: WS> How can I let user delete a uploaded image file in the server's WS> directory? unlink() Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them

RE: [PHP] delete file

2005-03-24 Thread Jay Blanchard
[snip] How can I let user delete a uploaded image file in the server's directory? [/snip] http://www.php.net/unlink -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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, 2002 8:37 AM Subject: [PHP] delete file contents before writi

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

RE: [PHP] delete file contents before writing?

2002-06-03 Thread Naintara Jain
If you really want to delete the file contents then open the file in write-only mode, like so: $open_file = fopen("$file_name","w"); -Naintara -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] t]On Behalf Of Jas Sent: Monday, June 03, 2002 8:37 AM To: [EMAIL PROTECTED]

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

RE: [PHP] Delete File Contents?

2001-12-17 Thread Jeremy Allen
Just open the file in mode "w". $fp = fopen("your_file", "w"); There is also the the function fseek(), which will allow you to move the file pointer around to any place in the file. Mode "w" will suffice for your needs. fopen() - http://www.php.net/manual/en/function.fopen.php fseek() - http: