faqts : Computers : Programming : Languages : PHP : Function Libraries : File Handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

79 of 93 people (85%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do you delete a file from a server using php from a web page?

Jan 25th, 2001 20:25
Philip Olson, Jerry Garcia,


Assuming you have permission to do so, consider using the unlink() 
function :
    http://www.php.net/manual/en/function.unlink.php
An example use :
    $file = '/path/to/filename.txt';
    unlink($file);
Read the user comments within the above manual link for related 
information.