Are there any way to check the file befor upload it, it have virus or not ??
My code upload is :-
function uploadfile()
{
$allowedExtensions = array("jpg","jpeg","gif","png","doc","pdf","ppt","zip","rar","xls","pptx","docx","xlsx");
$split=explode(".",$_FILES["filework"]["name"]);
$type=strtolower($split[sizeof($split)-1]);
$rname=time().".".$type;
if (in_array(end($split),$allowedExtensions)) {
$destination = "uploads/".$rname;
$temp_file = $_FILES['filework']['tmp_name'];
move_uploaded_file($temp_file,$destination);
return $rname;
}
else {return false;}
}