I am having trouble uploading files to my website using HTTP uploads with PHP. The code is below for the upload and here are the error messages that I get:
le]: failed to open stream: Is a directory in /home/.devlin/myusername/www.mydomain.com/includes/adminoptions.php
on line 20
Warning: move_uploaded_file() [function.move-uploaded-fi
le]: Unable to move '/tmp/phpHEk2JO' to '/home/myusername/www.mydomain.com/includes/guidelines/'
on line 20
Line 20 is the line with move_uploaded_file in the code snippet below.
The directory being uploaded to DOES exist on the server. I didn't have any issues with this upload when I was doing it on another form that runs in a higher directory (instead of the php file being in /includes/ it was just in the root directory). I'm pretty sure that the issue is something to do with absolute versus relative paths but I can't figure out how to fix it?
I even tried changing the working directory and using ../ in the references etc but nothing I can figure out works.
Thanks for any help!
echo "after successful file move <br>";
$message .= '<br><center><strong>New guidelines file uploaded successfully!</strong></center><br>';