Hello Friends, Please try to solve my problem.. I use below scripts to upload image.. It works sucessfully on my computer ( localhost )... But when I upload it into server below warning is shown Warning: move_uploaded_file(img/3.GIF) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/eabhiyan/public_html/upload/index.php on line 6 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpnU1fkZ' to 'img/3.GIF' in /home/eabhiyan/public_html/upload/index.php on line 6 <?php if ($_REQUEST[completed] == 1) { echo $newname = $_FILES['mailfile']['name']; echo $_FILES['mailfile']['tmp_name']; move_uploaded_file($_FILES['mailfile']['tmp_name'],//this is line 6 "img/$newname"); } ?> <html> <head><title>Upload page</title></head> <body><h1>Image Uploader</h1> <?php if ($_REQUEST[completed] != 1) { ?> <b>Please upload an image</b><br> <form enctype=multipart/form-data method=post> <input type=hidden name=MAX_FILE_SIZE value=1500000> <input type=hidden name=completed value=1> Choose file to send: <input type=file name=mailfile> and <input type=submit></form> <?php } else { ?> <b>Yum, Yum. I enjoyed that</b> <?php } ?> <hr> Copyright, etc </body></html> Please give your logic to solve my problem.. I am waiting for reply..
Open your ftp. select the 'img' folder. Right click on it, then click on 'Attributes'. Now select all permission for owner, read permission for group and user. Hope it will help you.