[Phpwm] displaying images on screen

Alex Mace alex at hollytree.co.uk
Thu Oct 2 14:50:11 UTC 2008


If you're operating on files that are already on the system then by  
definition they'll already have unique filenames...

As has been said though, caching them would be sensible if they're  
going to be accessed more than once.

On 2 Oct 2008, at 15:42, Tim Williams wrote:

> On Thu, 2 Oct 2008, Alex Mace wrote:
>
>> I think in that situation you'll need to save it out to a file and
>> write an <img /> tag into the html to access it - I don't think there
>> is a way to output the picture as binary in the middle of some html.
>> If you don't want to save it out, just set the "src" attrobute of the
>> img to something like
>>
>> rotateimage.php?filename=YOURFILENAME
>
> You need to make sure to use a unique file name for every saved  
> image if
> you do this, otherwise you end up with some interesting problems if  
> you
> have more than one person at a time on the website. However, that's a
> potentially messy solution unless you have some reason to want to  
> cache
> the images generated on the server.
>
> The trick is to split up the processing between two PHP pages, one
> generates the HTML page, that HTML page then contains an <img> tag  
> which
> links to a second PHP script which generates the image. You could  
> either
> use sessions or get parameteres embedded in the image URL to  
> transfer the
> necessary data between the two php scripts.
>
> Tim W
>
> -- 
> Tim Williams BSc MSc MBCS - Euromotor Autotrain
> Web : http://www.autotrain.org
> Tel : +44 (0)121 414 2214 (ext 42214 on internal phone)
>
> _______________________________________________
> Phpwm mailing list
> Phpwm at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/phpwm




More information about the Phpwm mailing list