$uploaddir = 'uploads/';
$uploadfile = $uploaddir.basename($_FILES['uploadedfile']['name']);
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'],$uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
}
else {
echo "File uploading failed.\n";
}
Choose a file to upload:
but not more then 2Mb... bcoz our upload_max_filesize is only 2mb
No comments:
Post a Comment