I’m a noob in PHP.
After doing a lot of reading on this forum and other articles, I’ve created an upload form and use a php file to process it and do different things with different elements.
One of them is uploading a file.
[CODE]//Upload files
$uploaddir = ‘http://www.websitename.com/artworks/’;
$uploadfile = $uploaddir.$_FILES[‘req_artwork’][‘name’];
$userfile = $_FILES[‘req_artwork’][‘name’];
$tmp_name = $_FILES[‘req_artwork’][‘tmp_name’];
After submitting the form, I get the following error message:
[COLOR=”red”]Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/tmp/phpRBNnTq’ to ‘
I’ve looked at line 33 in my PHP script and all that’s there is
[CODE]if (move_uploaded_file($_FILES[‘req_artwork’][‘tmp_name’],’http://www.websitename.com/folder/’)) {
print (‘Your file has been uploaded.’);
}
else {
print (‘There was a problem with the upload of your artwork. Please e-mail your artwork directly to [email protected].’);
}
My hosting server is running PHP 5.2.5.
I’ve been trying to read up and find out what could ’cause this, but no luck.
Can someone guide me or let me know what could cause this problem?
Thank you in advance.