עשיתי כך:
PHP קוד:
echo "<center><b><u>List of the upload files:</u></b><br />\n";
if ($handle = opendir("../" . $upload_path)) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo $file . " (<a href=\"$PHP_SELF?d=upload&action=delete&file=$file\">Delete</a>)<br />\n";
}
}
closedir($handle);
}
else {
echo "<u>Error:</u> Cannot open uploads directory\n";
}
echo "</center>\n";
if($action == "delete" && $file == $file) {
unlink("../" . $upload_path . $file);
}
והקובץ לא נמחק..