// Upload an image to your website // Add the following script to a php page. ----------------------------------------------------------
|
";
}
if ($userfile_name[$i] != "") {
if ($userfile_size > $maxfile) {
echo "This file is too big for uploading. It is $userfile_size bytes. Please click here to go back and upload a smaller file.";
exit;
}
// Display info
$h = $i + 1;
echo "$h \n"; echo "Path: $userfile_tmp \n"; echo "Name: $userfile_name \n"; echo "Size: $userfile_size bytes \n"; echo "Type: $userfile_type \n\n"; echo "Click here to view it "; // upload file $location = "$filedir/$userfile_name"; move_uploaded_file($userfile_tmp, $location); if ($fileupload_type[$i] == "image/gif" || $fileupload_type[$i] == "image/jpeg") { echo " \n\n"; } // end of file upload } // end loop } } ?> |