Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/dddd/public_html/upload.php on line 39
arkadaşlar bu hatayı nasıl düzelte bilirim
Kod
<?php
$array = array("ı" ,"ü" ,"ç" ,"ö" ,"İ" ,"Ü" ,"Ğ" ,"ğ" ,"Ö" ,"Ş" ," ");
$hedefim = "img/".$dosya;
$baslik=$_POST["baslik"]; // Formdan Gelen Basligi Aldik
$kaynak = $_FILES["resim"]["tmp_name"];
$dosya = str_replace(" ", "_", $_FILES["resim"][name]);
$dosya = str_replace($array, '-',$dosya);
if (file_exists($hedefim)) {
$hmz = substr(md5(uniqid(rand())),0,8);
$hedefim = "img/$hmz-".$dosya;
$dosya = "$hmz-".$dosya;
}
$hedefim = strtolower($hedefim);
move_uploaded_file($kaynak,$hedefim);
$xxx = getimagesize($hedefim);
$buyuk_en=$xxx[0] ;
$buyuk_boy= $xxx[1] -5 ;
$resim = substr($_FILES["resim"][type], strpos($_FILES["resim"][type],'/')+1);
switch($resim) {
case 'jpeg':
case 'pjpeg':
case 'tiff';
$resim = imagecreatefromjpeg($hedefim);
break;
case 'png':
case 'x-png':
$resim = imagecreatefrompng($hedefim);
break;
case 'gif':
$resim = imagecreatefromgif($hedefim);
break;
default:
return FALSE;
break;
}
$beyaz = imagecolorallocate($resim, 255,255,255);
$siyah = imagecolorallocate($resim, 0, 0, 0);
imagettftext($resim, 30, 0, 5, $buyuk_boy, $beyaz, "2.ttf", "$baslik"); // Burada Resimin ustune Yazı yazıyoruz ;)
imagejpeg($resim,$hedefim,100);
echo "$hedefim";
?>