Kod
Warning: imagejpeg(): Unable to access avat/avat_1133519528.jpeg in /home/hpsi/public_html/enigme/class/upload.php on line 38
Myslalem z początku myslalem ze to bład w uprawniniach (ale są na 777) w katalogu. Wiec teraz juz nie mam pojęcia o co może chodzić
oto kod
<?php function zdjecie($im_file_name, $new_path, $width, $height) { $im_old = imageCreateFromJpeg($im_file_name); $th_max_width = $width; $th_max_height = $height; if($image_attribs[0]>=$image_attribs[1]) { @$ratio = ($width >= $height) ? $th_max_width/$image_attribs[0] : $th_max_height/$image_attribs[1]; } else { @$ratio = ($width < $height) ? $th_max_width/$image_attribs[0] : $th_max_height/$image_attribs[1]; } $th_width = $image_attribs[0] * $ratio; $th_height = $image_attribs[1] * $ratio; $im_new = imagecreatetruecolor($th_width,$th_height); imageCopyResampled($im_new,$im_old,0,0,0,0,$th_width,$th_height, $image_attribs[0], $image_attribs[1]); imageJpeg($im_new,$new_path,80); } ?>