file upload problems

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I'm using the code:

$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"
<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" />



Re: file upload problems wrote:
Quoted text here. Click to load it

no write permission in the dir you move the file to?


Re: file upload problems

Maybe your file has a size higher than the maxim size allowed for the server

chotiwallah wrote:
Quoted text here. Click to load it

Re: file upload problems


If you are using PHP 4.2.0 or above then you may find that the
following page helps :

I was getting errors in one of my scripts then I stumbled across that
page, found out what the error actually was and was able to fix it.

Hope this helps,


Site Timeline