Problem
move_uploaded_file(C:/wamp/www/vab/userpics) ::failed to open stream: Permission denied in C:\wamp\www\vab\app_code\Controller\uploads.php on line 11
I am using WAMP package 2.0 on windows Platform.
can Any one Suggest what should be the solution for this Problem?
Here are Few steps that I followed........
1. I uncheck the "use simple file sharing " checkbox under tools>>Folder options >> views.
2. then I gave full controll to my useraccount on my application located at C:\wamp\www\vab
Here is code that I written.......
Code:
if(move_uploaded_file($_FILES['file']['tmp_name'],$imgname))
{
$type=checkFile($imgname); //to check file type
if($type==".gif" ||$type==".jpg" || $type==".png"){
$user=new UserInfo();
$user->setEmail($_SESSION['email']);
$done=$photo->changePhoto($imgname, $user, $type, $dir); // to create & save url in database.
if($done){
$_SESSION['msg']="Profile Picture Changed....";
redirect_to("../../pages/freeHome.php");
}
else{
$_SESSION['msg']="An error Occured while uploading.<br> Please try later....";
redirect_to("../../pages/freeHome.php");
}
}
else
echo "Please Choose a correct File type";
}
Please help me in resolving this code.