$mime = mime_content_type($file); if(strstr($mime,"video/")){ // this code for video }else if(strstr($mime,"image/")){ // this code for image }
应该适用于大多数文件扩展.
$mime = mime_content_type($file); if(strstr($mime,"video/")){ // this code for video }else if(strstr($mime,"image/")){ // this code for image }
应该适用于大多数文件扩展.