Soy muy muy novato (tanto que sólo he mirado PHP para crear el archivo del que os voy a hablar).
Bueno, el asunto es que tengo una imagen: www.meteocalamillor.com/pastilla.png a la cual quiero insertar la información contenida en www.meteocalamillor.com/pastilla.txt
El código de www.meteocalamillor.com/pastilla.php es:
Código PHP:
<?php
@ $fp = fopen('pastilla.txt', 'rb');
if (!$fp)
{
echo 'ERROR';
exit;
}
else
{
$temperatura = fgets ($fp,5);
$humedad = fgets ($fp,5);
$precipitacion_ultima_hora = fgets ($fp,5);
$precipitacion_24hrs = fgets ($fp,5);
$viento = fgets ($fp,5);
$viento_direccion = fgets ($fp,5);
fclose($fp);
}
$im = ImageCreateFromPNG ('pastilla.png');
$font_size = 15;
$font_name = 'arial';
$white = ImageColorAllocate ($im, 255,255,255);
ImageTTFText ($im, $font_size, 0, 20, 10, $white, $fontname, $temperatura);
Header ('Content-type: image/png');
ImagePNG ($im);
Imagedestroy ($im);
?>
Cita:
A ver si me podéis echar una mano.Warning: imagettftext() [function.imagettftext]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home:/tmp:/usr) in /home/meteocal/public_html/pastilla.php on line 29
Warning: imagettftext() [function.imagettftext]: Invalid font filename in /home/meteocal/public_html/pastilla.php on line 29
Warning: Cannot modify header information - headers already sent by (output started at /home/meteocal/public_html/pastilla.php:29) in /home/meteocal/public_html/pastilla.php on line 31
Warning: imagettftext() [function.imagettftext]: Invalid font filename in /home/meteocal/public_html/pastilla.php on line 29
Warning: Cannot modify header information - headers already sent by (output started at /home/meteocal/public_html/pastilla.php:29) in /home/meteocal/public_html/pastilla.php on line 31
Gracias compañeros ;)