I would like to delete a file that is found in my localhost.
localhost/project/folder/file_to_delete
I\'m using codeigniter for this.
http://php.net/manual/en/function.unlink.php
It is the best way to understand. Read it!
$path_to_file = '/project/folder/file_to_delete'; if(unlink($path_to_file)) { echo 'deleted successfully'; } else { echo 'errors occured; }