Home › Forums › Back End › PHP-Uploader › Re: PHP-Uploader
Ok, now I’ve changed my entire code, I actually got it from http://www.zymic.com/tutorials/php/creating-a-file-upload-form-with-php/comments/, and here it is:
die(‘The file you attempted to upload is too large.’);
// Check if we can upload to the specified path, if not DIE and inform the user.
die(‘You cannot upload to the specified directory, please CHMOD it to 777.’);
// Upload the file to your specified path.
if(move_uploaded_file($_FILES[‘userfile’][‘tmp_name’],$upload_path . $filename))
echo ‘Your file upload was successful, view the file here‘; // It worked.
echo ‘There was an error during the file upload. Please try again.’; // It failed :(.
My example website: http://www.knuddels-hosting.de/php/testsite.php
Following error occurs: "There was an error during the file upload. Please try again."