Menu
hi ,
i found this simple uploader script , works fine . I want to eliminate the some file types (exe , avi ,etc.. ) , and i would also like to eliminate files bigger than lets say 3 mb . How can i do that ?
[code=php]
<?php
$target_path = “../forumpics/”;
$target_path = $target_path . basename( $_FILES[‘uploadedfile’][‘name’]);
if(move_uploaded_file($_FILES[‘uploadedfile’][‘tmp_name’], $target_path)) {
echo “The file “. basename( $_FILES[‘uploadedfile’][‘name’]).
” has been uploaded”;
} else{
echo “There was an error uploading the file, please try again!”;
}
?>
Thanks