Code: Select all
<?php
echo "Current files in your extras' directory: <br /><br />";
if ($handle = opendir("$username_saved/extras")) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "$file <a href=deletefile.php>DELETE</a><br />";
}
}
closedir($handle);
}
?>Code: Select all
<?php
session_start();
$username_saved = $_SESSION['username_saved'];
unlink("$username_saved/extras/$file");
?>
Warning: unlink(watson516/extras/) [function.unlink]: Permission denied in C:\Program Files\AbyssWebServer\htdocs\deletefile.php on line 5
What's wrong? And as with the downloads, I have no idea how to do it. Any help would be appreciated.