Re: [Templates] GD
[prev]
[thread]
[next]
[Date index for 2004/08/05]
--uTRFFR9qmiCqR05s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
* Isarin Sathitruangsak <hatyai at sdf.lonestar.org> [2004/08/05 15:18]:
>=20
> Hi there,
>=20
> I am not so sure how to use GD and hope someone could shed some light.
>=20
> I've get this error when I tried to use GD with TT
>=20
> [Thu Aug 05 10:48:14 2004] [error] [client 172.16.140.146] malformed=20
> header from script. Bad header=3D\x89PNG: tt
You need to emit a Content-type header before your data. In this simply
case, it's simple as:
> #!/dssweb/local-perl/bin/perl
> use strict;
> use Template;
>=20
> my $tt =3D Template->new({
> INCLUDE_PATH =3D> '/dssweb/template',
> INTERPOLATE =3D> 1,
> }) || die "$Template::ERROR\n";
>=20
> my $vars =3D "Hello !";
print "Content-type: image/png\n\n";
> $tt->process('tst/gd.tmpl', $vars) || die $tt->error(), "\n";
(darren)
--=20
How you look depends on where you go.
--uTRFFR9qmiCqR05s
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFBElG8zsinjrVhZaoRAhMuAKCgPsKheWlmARt1O7aQA5JbUmEuhgCdFwlf
T8aigGWNrvU6zzrRqyL/yQo=
=e9eb
-----END PGP SIGNATURE-----
--uTRFFR9qmiCqR05s--
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] GD
Darren Chamberlain 15:26 on 05 Aug 2004
|