добрый день,не выводится картинка,проблема в htaccess,помогите закомментировать htaccess.Вот код с файла
<?php
$type = 1;
$w = 28;
$infile = trim($_GET['f']).'.png';
if (!file_exists($infile)) {
$infile = "nofoto.jpeg";
}
$f1 = strrpos($infile, ".");
$f2 = substr($infile, $f1 + 1, 999);
$format = strtolower($f2);
switch ($format) {
case "gif":
header("Content-type: image/gif");
$src = ImageCreatefromGIF($infile);
break;
case "jpg":
header("Content-type: image/jpeg");
$src = ImageCreatefromJPEG($infile);
break;
case "jpeg":
header("Content-type: image/jpeg");
$src = ImageCreatefromJPEG($infile);
break;
case "png":
header("Content-type: image/png");
$src = ImageCreatefromPNG($infile);
break;
}
$w_src = imagesx($src);
$h_src = imagesy($src);
if (function_exists('imagecreatetruecolor')) {
$function_imagecreate = imagecreatetruecolor;
} else {
$function_imagecreate = imagecreate;
}
if (function_exists('imagecopyresampled')) {
$function_imagecopy = imagecopyresampled;
} else {
$function_imagecopy = imagecopyresized;
}
$q = 60; //Качество
$dest = $function_imagecreate($w, $w);
if ($w_src > $h_src) {
$function_imagecopy($dest, $src, 0, 0, round((max($w_src, $h_src) - min($w_src,
$h_src)) / 2), 0, $w, $w, min($w_src, $h_src), min($w_src, $h_src));
} else
if ($h_src > $w_src) {
$function_imagecopy($dest, $src, 0, 0, 0, 0, $w, $w, min($w_src, $h_src), min($w_src,
$h_src));
} else
if ($w_src == $h_src) {
$function_imagecopy($dest, $src, 0, 0, 0, 0, $w, $w, $w_src, $w_src);
}
if (!is_resource($dest)) {
echo 'Cannot initialize new GD image stream|Не может инициализировать новый поток изображения GD' .
$w . '';
} else {
// вывод картинки и очистка памяти
switch ($format) {
case "gif":
imagegif($dest, '', $q);
break;
case "jpg":
imagejpeg($dest, '', $q);
break;
case "jpeg":
imagejpeg($dest, '', $q);
break;
case "png":
imagecolortransparent($dest, $infile);
ImagePng($dest);
break;
}
ImageDestroy($src);
ImageDestroy($dest);
}
?>