is it possible to limit the filesize, so that the form can only be send ,if the size is under the limit
I want to get an error message,when the size is too big
like this....
- Code: Select all
<?php
if (filesize($_FILES['file']['tmp_name']) > 20480) { move_uploaded_file($_FILES["file"]["tmp_name"],"./files/".$_FILES["file"]["name"]); } else { echo "the file is too big";}
?>