lundi 30 novembre 2015

PHP: Issues with rename() and move_upload_file() functions

I have a fairly simple file up-loader I've built for WordPress. I have an issue with the conditional statement below.

Strangely this condition is met with uploads which are small in size, however when I attempt to upload a larger file the function breaks on this condition.

if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $fullPath)) {
  echo "The file " .  basename($_FILES['uploadedfile']['name']) . " has been uploaded";
} else {
  echo "Unknown error uploading file";
}

I have various other conditions which are all being met, including a file size check. Does anyone have any clues as to what is wrong here? I've also tried the rename() function in place of move_uploaded_file().



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire