View Single Post
ישן 19-03-06, 07:00   # 10
בניה
משתמש - היכל התהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
מיקום: נחושה
הודעות: 3,434

בניה לא מחובר  

לש"ש


שיניתי במחיקה מ $file k $_GET['file']
ועוד משהוא קטן.:
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 "&nbsp;(<a href=\"$PHP_SELF?d=upload&action=delete&file=$file\">Delete</a>)<br />\n";
       }
   }
   
closedir($handle);
}
else {
  echo 
"<u>Error:</u>&nbsp;Cannot open uploads directory\n";
}
echo 
"</center>\n";

if(
$action == "delete" && $_GET['file']!='') {
    
unlink("../" $upload_path $_GET['file']);

וגם תוודא שבשורה הזו:
upload&action=delete&file=$file
המשתנה $file באמת מודפס ולא רק השם שלו.