here is my php file for upload the video file...........how to write the validation of video file type? like if the file type is img, or not the .wmv, .rmvb.............as well as how to validate the file size??
Code:<?php if (!is_uploaded_file($_FILES['uploadfile']['tmp_name'])){ echo "you did not upload a file"; unlink($_FILES['uploadfile']['tmp_name']); } else { $target_path = "VideoUploadFolder/"; $target_path = $target_path.basename($_FILES['uploadfile']['name']); if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $target_path)){ echo "the file ".basename($_FILES['uploadfile']['name']). " has been uploaded"; } else{ echo "there was an error uploading the file, please tryagain!"; } } ?>




Reply With Quote