if (!function_exists('isPhoto'))
{
function isPhoto($path)
{
$exploded = explode('.', $path);
$ext = strtolower(end($exploded));
$photoExtensions = ['png', 'jpg', 'jpeg', 'gif', 'jfif', 'tif'];
if (in_array($ext, $photoExtensions)) {
return true;
}
return false;
}
}
if (!function_exists('isVideo'))
{
function isVideo($path)
{
$exploded = explode('.', $path);
$ext = end($exploded);
$videoExtensions = ['mov', 'mp4', 'avi', 'wmf', 'flv', 'webm'];
if (in_array($ext, $videoExtensions)) {
return true;
}
return false;
}
}