Hi hope someone can help me
i have the folowing code
$weinachtfeier = $_POST['aname'];
$mapbeschrijving = $_POST ['expl'];
$slides="slides";
$thumbs="thumbs";
$new_height1=100;
$new_width1=66;
$new_height=66;
$new_width=100;
$allowed_types = array(
'image/pjpeg',
'image/jpg',
'image/png',
'image/jpeg');
$imagesize = $_FILES['pic']['size'];
$imagetype = $_FILES['pic']['type'];
$imagefile=$_FILES['pic']['name'];
if(in_array($_FILES['pic']['type'], $allowed_types))
{
copy ($_FILES['pic']['tmp_name'], $_FILES['pic']['name']) or die ("Could not copy");
$imagesize = $_FILES['pic']['size'];
$imagetype = $_FILES['pic']['type'];
$imagefile=$_FILES['pic']['name'];
list($width, $height) = getimagesize($_FILES['pic']['name']);
if ($_FILES['pic']['type'] == "image/png" )
{
if ($width<=$height){
$image_p1 = imagecreatetruecolor($new_width1,$new_height1);
$img = @imagecreatefrompng($imagefile);
imagecopyresampled($image_p1, $img, 0, 0, 0, 0, $new_width1, $new_height1, $width, $height);
$thename=$_FILES['pic']['name'];
$thenames="thumb$thename";
$location1=("$mapbeschrijving/$slides");
$location=("$mapbeschrijving/$thumbs");
imagepng($img,$location1, 9); /* this is line 82 */
imagepng($image_p1,$location, 9); /* this is line 83 */
}
if ($width>=$height){
$image_p1 = imagecreatetruecolor($new_width,$new_height);
$img = @imagecreatefrompng($imagefile);
imagecopyresampled($image_p1, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
$thename=$_FILES['pic']['name'];
$thenames="thumb$thename";
$location1="$mapbeschrijving/$slides/$thename";
$location="$mapbeschrijving/$thumbs/$thenames";
imagepng($image_p1,$location, 9);
imagepng($img,$location1, 9);
unlink($thename);
}}
but i have the folowing errors
Warning: imagepng() [function.imagepng]: Unable to open '1/slides' for writing: Permission denied in C:\xampp\htdocs\Template1\kg_narrengilde_foto_albums\Weinachtfeier\login\loggedin\FotoAlbenweinachtfeier\uploadimage.php on line 82
Warning: imagepng() [function.imagepng]: Unable to open '1/thumbs' for writing: Permission denied in C:\xampp\htdocs\Template1\kg_narrengilde_foto_albums\Weinachtfeier\login\loggedin\FotoAlbenweinachtfeier\uploadimage.php on line 83
How can i fix this
if i chmod("$location1", 0755);
I have the same errorr
what can i do about it
Thank in advice John