|
|
#1 (permalink) |
|
Üyelik Tarihi: 29.01.2005
Yer: Eskişehir - İstanbul - Toronto
Mesaj: 604
|
ImageCreate Hatası (PHP) - acil
Merhabalar.
Bir form uygulaması için resimden güvenlik kodu üretimi sistemini kullanmak istiyorum ancak yazılan kod resim yaratamıyor. Localimde PHP son versiyonu (5.0.4) bulunmakta. Kodu da aşağda belirtiyorum. resim.PHP Kod:
<?PHP session_start(); $text=@$ses_guvenlik_kodu; header("Content-type: image/jpeg"); $im = imagecreate(150, 40); $grey = imagecolorallocate($im, 0, 0, 0); $font1 = 'arial.ttf'; $font2 = 'curlz.ttf'; imagettftext($im,8,0,10,10,$black,$font1,"Güvenlik Kodunuz"); $x=11; $y=30; imagettftext($im, 20, -4, $x, $y, $grey, $font, substr($text,0,1) ); imagettftext($im, 20, 0, $x, $y+2, $grey, $font, " ".substr($text,1,1)); imagettftext($im, 20, 4, $x, $y+1, $grey, $font, " ".substr($text,2,1) ); imagettftext($im, 20, -6, $x, $y+1, $grey, $font, " ".substr($text,3,1)); imagettftext($im, 20, -3, $x, $y+1, $grey, $font, " ".substr($text,4,1)); imagettftext($im, 20, -5, $x, $y-2, $grey, $font, " ".substr($text,5,1)); imagejpeg($im); imagedestroy($im); ?> |
|
|
|
|
|
#2 (permalink) |
|
Üyelik Tarihi: 30.11.2000
Yer: Bursa
Yaş: 20
Mesaj: 809
|
Re: ImageCreate Hatası (PHP) - acil
PHP ile resim kütüphanesinin kullanılması için bazı bağımlılıklar var. PHP'nin resim kütüphanesini kullanabilmesi için bu gerekli dosyaların olması lazım. Listesi için;
http://tr2.php.net/manual/en/ref.image.php
__________________
muarifer » ruby, rails, postgresql, yazılım geliştirimi falan... |
|
|
|
Zoque'a hoşgeldiniz!