move_uploaded_file [SOLVED]

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

move_uploaded_file [SOLVED]

Post by aceconcepts »

Hi,

I have written an upload program so many times but i am stuck with this one.

I keep getting the following error when I try to upload a file:

Warning: move_uploaded_file(/uploads/client_logos/back.gif) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home/site/public_html/dev/registration/admin/inc/event_newValidation.php on line 787

I know for a fact that the folders exist on the server and I have changed dir permissions too.

What might it be?
Last edited by aceconcepts on Wed Mar 26, 2008 10:17 am, edited 1 time in total.
samb0057
Forum Commoner
Posts: 27
Joined: Wed Mar 26, 2008 9:51 am

Re: move_uploaded_file

Post by samb0057 »

It must be that the directory /home/site/public_html/dev/registration/admin/inc/ does not exist.
Note that if /home/site/public_html/dev/registration/admin/ exists, but does not have the inc/ directory, this will fail.
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: move_uploaded_file

Post by aceconcepts »

Thanks for the reply.

I think I've been staring at the screen for too long. It's rather embarasing really...I was using the host path and not the root path DOH

Thanks anyway.
Post Reply