View Single Post
ישן 18-03-06, 22:03   # 3
miniature
חבר וותיק
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 1,754

miniature לא מחובר  

עשיתי כך:
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" && $file == $file) {
    
unlink("../" $upload_path $file);

והקובץ לא נמחק..
__________________
יואב.

דרכים ליצירת קשר:

אימייל: thebigfire@walla.co.il
הודעה פרטית