Posted by jmlin84 on 09/28/05 07:53
I'm using the code:
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'],
$target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). "
has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
but move_uploaded_file keeps returning false. I checked the $_FILES
array and all the values are correct and it seems as if the file is on
ther server. I just can't move it. Any ideas anyone?
I'm using a form to uploada the picture.
<form enctype="multipart/form-data" action="./uploadUserPhoto.php"
method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a picture to upload:
<input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />
</form>
thanks,
James
Navigation:
[Reply to this message]
|