$max_filesize) { die('Your filesize is too large. Please make your filesize smaller than ' . $max_filesize . ' bytes.'); } // End if filesize is too large # Check to see if the filetype is correct if ($_FILES['data']['type'] != $filetype) { die('Sorry, your file was not of the ' . $filetype . ' mimetype (yours was ' . $_FILES['data']['type'] . ').'); } // End filetype check # If file has gotten this far, it is successful $copy_to = $_SERVER['http://www.leduckaratedo.com/netshoc/upload'] . $upload_path . $_FILES['data']['name']; # Upload the file $upload = move_uploaded_file($_FILES['data']['tmp_name'], $copy_to); # Check to see if upload was successful if (!$upload) { die('Sorry, your file could not be uploaded.'); } echo 'Your file contents are below:
' . file_get_contents($copy_to); ?>