From the title you can see i am looking for a way to delete a file from a different directory. All i can find on the subject is the unlink(), but from what i read in the documentation and from testing that function is it deletes the file name from the code you put it in. Makes me think it's quite similar to closing the file. What I am trying to do is actually delete a file using code so my user doesn't have to manually go to the folder and find the song they just deleted from the mysql database.
unlink() will delete the file off your server
rmdir() will delete a directory off your server
Note: Once it's gone, it's gone.
unlink truly deletes the specified file from the disk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With