PHP File upload problem

He has: 12 posts

Joined: Sep 2005

I have a trouble uploading a file in PHP via a form

I get error: "failed to open stream: No such file or directory"
for function move_uploaded_file

I checked paths parameteres to this function and are ok.

what other problem might there be?

Busy's picture

He has: 6,151 posts

Joined: May 2001

could be a number of things,
the folder is not there
folder is spelt wrong
the folder has not been chmod'd to allow writing to
the uploaded file was corrupt
you moved the tmp or real image to soon
...

Can you post the code for your upload script, not all of it, just the move_uploaded_file() bit

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.