コード例 #1
0
ファイル: Gallery.php プロジェクト: rocketyang/admap
 public static function deleteDependentFiles($adverId, $fileName)
 {
     $galleryPath = Gallery::getImagePath($adverId) . DIRECTORY_SEPARATOR . $fileName;
     if (file_exists($galleryPath)) {
         @unlink($galleryPath);
     }
 }
コード例 #2
0
ファイル: Adver.php プロジェクト: rocketyang/admap
 public static function deleteDependentFiles($adverId)
 {
     $galleryPath = Gallery::getImagePath($adverId);
     $attachmentPath = Attachment::getAttachmentPath($adverId);
     if (is_dir($galleryPath)) {
         FileHelper::removeDirectory($galleryPath);
     }
     if (is_dir($attachmentPath)) {
         FileHelper::removeDirectory($attachmentPath);
     }
 }