I would write a script that, when given no input, displays the directory. My script would use opendir() to open the directory, and readdir() to output those directories. It would output them as links in the form of "<a href="
if(file_exists($file)) {
unlink($file);
echo "file $file deleted";
} else {
echo "no such file";
}
which works but I have to have the delete script in the same directory as what I'm trying to delete, if I want the delete file in another directory, how do I specify a path?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.