Hi
Thank you for reading my post
I am trying to run a php based application using php5 and apache.
but I receive an error like:


*Fatal error*:  Call to undefined function imagefontwidth() in 
*/var/www/v603/includes/functions.php* on line *28*


when line 28 and its surrounding lines are:

## create an image not a text for the pin

    $font  = 6;

    $width = imagefontwidth($font) * strlen($generated_pin);

    $height = ImageFontHeight($font);

 

    $im = @imagecreate ($width,$height);

    $background_color = imagecolorallocate ($im, 219, 239, 249); //cell 
background

    $text_color = imagecolorallocate ($im, 0, 0,0);//text color

    imagestring ($im, $font, 0, 0,  $generated_pin, $text_color);

    touch($image_url . 'uplimg/site_pin_' . $full_pin . '.jpg');

    imagejpeg($im, $image_url . 'uplimg/site_pin_' . $full_pin . '.jpg');

 

    $image_output = '<img src="' . $image_url . 'uplimg/site_pin_' . $full_pin 
. '.jpg">';

 

    imagedestroy($im);

 

    return $image_output;



Can you tell me what is wrong with this code and how I can resolve the
problem.

Thanks

Reply via email to