Browse Source

Добавлен метод imageMinCheckSize

master
Alexander Demidov 12 years ago
parent
commit
c36c64359a
  1. 16
      UploadHelper.class.php

16
UploadHelper.class.php

@ -41,4 +41,20 @@ abstract class UploadHelper
}
return false;
}
/**
* @param $size
* @param $file_path
* @return bool
*/
public static function imageCheckMinSize($size, $file_path)
{
$imagesize = getimagesize($file_path);
$size_parts = explode('x', $size);
if ($imagesize[0] >= $size_parts[0] && $imagesize[1] >= $size_parts[1]) {
return true;
} else {
return false;
}
}
}
Loading…
Cancel
Save