$_FILES is an Associative array created by PHP that stores file name, type, size etc
Settings to be done in php.ini configuration file.
Open php.ini file in notepad editor.
1) search for post_max_size and make it as follows
post_max_size = 10M
Maximum size of POST data that PHP will accept.
i.e At the max 10Mb data can be sent from Client to Server via post method.
2) search for file_uploads and make it as follows
file_uploads = On
It determines if HTTP file uploads allowed or not.
3)search for upload_tmp_dir and make it as follows
upload_tmp_dir = "c:/wamp/tmp"
Its Temporary storage for uploaded files.
/* $loc is the location to move uploaded file " ./images/ " means images folder is present in current directory where upload.php file is kept*/
<body><form action="upload.php" method="post" enctype="multipart/form-data">
Select File to Upload <input type=file name="f1" /><input type=submit value="Upload" />
echo $_FILES['f1']['name'].' File Uploaded successfuly';
echo $_FILES['f1']['name'].' File Not Uploaded. Try again';