How to add file type checking in this code
Posted: Wed Jun 23, 2004 3:31 am
Code: Select all
<?php
if(!empty($_FILES) && $_FILES['img1']['size'] < 200000 /* max size */ && $_FILES['img1']['size'] > 0)
move_uploaded_file($_FILES['img1']['tmp_name'], '/path/to/new/location/'.$_FILES['img1']['name']);
?>2) image size is now number 200000, but in what units - is it 200kb or 200mb, I'm not sure so please, little help.
Thanks ahead !