May 28, 2011

PHP 刪不同類型副檔名的函式

//路徑,圖名,副檔名稱類型

function DeleteImg($FilePath,$ImgName,$ImgType)

   for($i=0;$i<count($ImgType);$i++){
      if(file_exists($FilePath.$ImgName.$ImgType[$i])){      
         unlink($FilePath.$ImgName.$ImgType[$i]);
        }
   }  
}


DeleteImg('uploads/','1',array('.gif','.jpeg','.jpg','.png'));

Today's Visitors: 0 Total Visitors: 0
Personal Category: Uncategorized Articles Topic: learning / education / linguistic
[Trackback URL]

Post A Comment









Yes No



Please input the magic number:

( Prevent the annoy garbage messages )
( What if you cannot see the numbers? )
Please input the magic number

誰來收藏
Loading ...
unlog_NVPO 0