PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

dirname> <copy
Last updated: Fri, 01 Jun 2007

view this page in

delete

(PECL zip:1.1.0-1.4.1)

delete — See unlink() or unset()

Description

void delete ( string $file )

This is a dummy manual entry to satisfy those people who are looking for unlink() or unset() in the wrong place.

See also unlink() to delete files, unset() to delete variables.



add a note add a note User Contributed Notes
delete
bmcouto at hotmail dot com
30-Sep-2006 08:30
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fclose($fh);

Now to delete testFile.txt we simply run a PHP script that is located in the same directory. Unlink just needs to know the name of the file to start working its destructive magic.

$myFile = "testFile.txt";
unlink($myFile);

The testFile.txt should now be removed.

dirname> <copy
Last updated: Fri, 01 Jun 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites