I am creating a PHP Program where it will delete the file inside a folder and i am using unlink() but after reading about unlink() it seems like it will not delete the "body" of the file if there is a file with a similar name even it is on a different directory. I need to totally delete the file even if there's a file with a similar name, any suggestions or additional actions i should've done?.
Thank you in advance.
unlink()
will delete the file path/name that you give it (assuming you have permission). "Similar" names will not effect it. Identical names of files not in the same folder will also not affect the file deletion.
The entire file will be deleted. I am not sure what you mean by the "body" of the file though as the whole file will be deleted.