درشرط تابع in _array با اینکه فرمت فایل رو تعیین کردم ،پیام your file is not supported نمایش میده
چند فایل مختلف رو امتحان کردم ولی باز همینه
$fileExtention = strtolower(end($fileNameSperator));
$newNameFile = md5(time().$nameFile).'.'.$fileNameExtention;
$allowedFilesExtentions=['jpg','png','gif','zip','ico','rar','txt'];
if (in_array($fileExtention,$allowedFilesExtentions)) {
$newDirectori ='uploaded/';
$despath = $newDirectori.$newNameFile;
if (move_uploaded_file($TmpNameFile,$despath)) {
$msg = 'your file uploaded successfully';
}else {
$msg = 'your file uploaded not successfully!!!';
}
}
else {
$msg = 'your file is not supported' ;
}