1--TEST-- 2is_uploaded_file() function 3--CREDITS-- 4Dave Kelsey <d_kelsey@uk.ibm.com> 5--POST_RAW-- 6Content-type: multipart/form-data, boundary=AaB03x 7 8--AaB03x 9content-disposition: form-data; name="field1" 10 11Joe Blow 12--AaB03x 13content-disposition: form-data; name="pics"; filename="file1.txt" 14Content-Type: text/plain 15 16abcdef123456789 17--AaB03x-- 18--FILE-- 19<?php 20// uploaded file 21var_dump(is_uploaded_file($_FILES['pics']['tmp_name'])); 22 23// not an uploaded file 24var_dump(is_uploaded_file($_FILES['pics']['name'])); 25 26// not an uploaded file 27var_dump(is_uploaded_file('random_filename.txt')); 28 29// not an uploaded file 30var_dump(is_uploaded_file('__FILE__')); 31 32?> 33--EXPECT-- 34bool(true) 35bool(false) 36bool(false) 37bool(false) 38