Re: [htmltmpl] writing directly to stdout while using h::t
Brought to you by:
samtregar
From: Ron M. <rma...@in...> - 2003-06-25 16:59:25
|
On Wed, Jun 25, 2003 at 08:27:54AM -0700, pk...@ei... wrote: > vexing issue, pl bear with me. > > I am using a module that allows me to create images (think gd). > Typically I write the image to a temp directory, and then include that > image in my html template (see example below)... [snip] Well, the way you would accomplish this is break up the creation of the image and the creation of the HTML that includes the image into two separate scripts. Script one uses the H::T template to produce html and sends that to the client with an image tag: <img src="/cgi-bin/script2.cgi">. Script2.cgi uses GD to create an image, sets the Content-type header to image/gif (or whatever is appropriate) and writes the image to stdout (sending the data to the users browser). No temp files to clean up! -- Ron Mahoney Ra Security Systems, Inc. rma...@ra... |