hi all
i am uploading an image on live linux hosting server and getting the below error
This is my php code
vineet
i am uploading an image on live linux hosting server and getting the below error
Code:
Warning: move_uploaded_file(../graphics/home_bigad2.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/gads/public_html/vineet/admin/add_special_offer.php on line 12 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpXjKkp7' to '../graphics/home_bigad2.jpg' in /home/gads/public_html/vineet/admin/add_special_offer.php on line 12
Code:
<?php require_once("../config.php");
$msg="";
if(isset($_REQUEST['submit']))
{
$loc=$_REQUEST['offer_loc'];
$path=$_FILES['offer_image']['name'];
move_uploaded_file($_FILES['offer_image']['tmp_name'], "../graphics/" . $_FILES['offer_image']['name']);
$qry="insert into special_offers(location,offer_image) values('$loc', '$path')";
if(mysql_query($qry))
$msg="Offer Inserted successfully";
else
$msg="Error Inserting Offer";
}
?>
Comment