0

Hi,

Does a file have to be writable in order to be deleted?

If a file is writable using the php is_writable() function does it mean it can also be deleted because it is writable?

Reason for asking is before i attempt to delete a file and record from database i am checking if the file exists using file_exists() and then if file exists checking if it is then is_writable so i can delete the file using unlink();

But not sure if a file that is_writable is also able to be deleted.

Thanks
PHPLOVER

Edited by phplover: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by phplover
0

Thank you d5e5,

This helps me allot in giving the user (admin) and appropriate error.

Thanks
PHPLOVER

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.