<?php
$allowed_ext = array(
'jpg' => true,
'gif' => true,
'png' => true
);
function easy_checkvalid_ext($ext,$allowed_ext)
{
if($allowed_ext[$ext])
{
return true;
}
else
{
return false;
}
}
$validfile = easy_checkvalid_ext('jpg',$allowed_image_format);
if ( !$validfile)
echo "not a valid file type";
?>
$allowed_ext = array(
'jpg' => true,
'gif' => true,
'png' => true
);
function easy_checkvalid_ext($ext,$allowed_ext)
{
if($allowed_ext[$ext])
{
return true;
}
else
{
return false;
}
}
$validfile = easy_checkvalid_ext('jpg',$allowed_image_format);
if ( !$validfile)
echo "not a valid file type";
?>
No comments :
Post a Comment