Welcome Guest, Not a member yet? Register   Sign In
How to delete the file
#2

File deletion is not part of a framework but a native php function. You are looking for the function unlink() (http://php.net/manual/en/function.unlink.php)

A small note, you cant delete a file based on the URL, the example you provide refers to a url (http://somedomain.com/uploads/images/somefile.jpg), you need to provide the (filebased) path to the file, for example:

PHP Code:
unlink(APPPATH '/uploads/images/somefile.jpg'); 
Reply


Messages In This Thread
How to delete the file - by jdk - 11-23-2015, 11:33 PM
RE: How to delete the file - by Diederik - 11-24-2015, 03:20 AM
RE: How to delete the file - by meow - 01-22-2016, 08:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB