-
Junior Member
Help with PHP move_uploaded_file
I am trying to upload a file using PHP Post Method Uploads, but I get file Permision errors:
Warning: move_uploaded_file(/hsphere/local/home/cd163601/back2bikes.ukpages.org/forsale/3_sm.jpg): failed to open stream: Permission denied
The script I am using is:
$uploaddir='/hsphere/local/home/cd163601/back2bikes.ukpages.org/forsale/';
$uploadfile=$uploaddir . "3_sm.jpg";
move_uploaded_file($_FILES['image']['tmp_name'], $uploadfile);
I have tried changing the destination path to:
var $uploaddir = '../forsale/';
but still no success.
Can anyone help me please?
-
Happy Steadfast Client
I would make sure that the forsale directory has write permissions for everyone. Or maybe if you set the group on that folder to apache then you can just give group access to write to that directory. You need to have write access on the directory to create a new file.
[ JUSTIN ]
[ justechnology llc ]
[ WEB DESIGN / DEVELOPMENT, TECHNICAL CONSULTING, & BUSINESS WEB HOSTING ]
[ when will apple? ]
[ GUESS THE RELEASE DATE AND GET THE SCOOP ON APPLE'S NEW PRODUCTS ]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks