View Full Version : [ubuntu] file upload in php check

February 3rd, 2012, 03:58 PM
hello, i have done the file upload in php, and i want to know that is there any way to check that $_FILES["file"] is empty or not. the user may not want to upload any file, so how can I check that? help please

February 3rd, 2012, 04:30 PM
How about

if (empty($_FILES['file'])) { stuff; }