Ver Mensaje Individual
  #4 (permalink)  
Antiguo 17/04/2010, 09:01
ElRodri
 
Fecha de Ingreso: julio-2008
Ubicación: /public_html/elrodri
Mensajes: 32
Antigüedad: 18 años, 2 meses
Puntos: 0
Respuesta: imagettftext(): Could not read font in...

Si borro las fuentes de la carpeta font me da este error:
Cita:
Warning: imagettftext() [function.imagettftext]: Could not find/open font in /home/xxx/public_html/www/firmaxxx.php on line 11
Pero cuando pongo bien la ruta me tira este otro error:
Cita:
Warning: imagettftext() [function.imagettftext]: Could not read font in /home/xxx/public_html/www/firmaxxx.php on line 11
Este es el código fuente simplificado pero con el mismo error que añadiendo fondo, y demás cosas...

Código PHP:
<?php

header
( "Content-type: image/gif" );

$nombre = "ElRodri";

$firma = imagecreatetruecolor( 400, 100 );

$negro = imagecolorallocate( $firma, 0, 0, 0 );

$fuente = "font/army.ttf";

imagettftext( $firma, 22, 0, 30, 26, $negro, $fuente, $nombre );

imagegif( $firma , NULL , 100 );

imagedestroy( $firma );

?>
Los archivos están colocados así:
  • [www]
    • [fondos]
      • fondo_01.gif
    • [font]
      • army.ttf
      • davidsans.ttf
    • firmaxxx.php
    • firma.php
    • ...

Es muy raro por que en el servidor local xampp funciona y al subirlo todo exacto al hosting no va