Tengo un error en la función Gd, quiero que se ejecute un código pero no me funciona, es decir se ejecuta pero no muestra nada, revise el phpinfo y la función Gd y freetype están enabled.
favor me pueden guiar soy nuevo en php
adjunto código
<?php
//Establecer la información local en castellano de España
setlocale(LC_TIME,"es_ES");
echo date("d");
echo date("F");
echo date("Y");
echo date("H");
echo date("i");
echo " --> la fecha actual es " . date("d") . " del " . date("m") . " de " . date("Y");
//Establecer el tipo de contenido
header('Content-Type: image/png');
// Crear la imagen
$im = imagecreatetruecolor(400, 30);
// Crear algunos colores
$blanco = imagecolorallocate($im, 255, 255, 255);
$gris = imagecolorallocate($im, 128, 128, 128);
$negro = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $blanco);
// El texto a dibujar
$texto = getdate();
//$texto = 'Testing....';
// Reemplace la ruta por la de su propia fuente
$fuente = 'arial.ttf';
// Añadir algo de sombra al texto
imagettftext($im, 20, 0, 11, 21, $gris, $fuente, $texto);
// Añadir el texto
imagettftext($im, 20, 0, 10, 20, $negro, $fuente, $texto);
// Usar imagepng() resultará en un texto más claro comparado con imagejpeg()
imagepng($im);
imagedestroy($im);
?>