Jump to content

Move uploaded file function help required please


Recommended Posts

Hello!!

 

I am very new to PHP, so apologies for my very basic understanding.

 

I am trying to code a page to upload images onto my server.

There is a problem with the move uploaded file function, here's the errors I am getting:

 

Warning: move_uploaded_file(upload/6117.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/smartie/public_html/upload_file.php on line 22

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpGyKvCf' to 'upload/6117.gif' in /home/smartie/public_html/upload_file.php on line 22

Stored in: upload/6117.gif

 

I think I'm having a problem as the PHP files and the folder I have called "upload" are stored within the "public_html" section my web server, whereas the file called "tmp" is not.  The file which is called "tmp" is not one I have created myself, it is one that was already there with my web server.

 

If anyone can help me overcome this problem, I would be very grateful.

 

I can post the other code used if required.

 

Thank you!!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.