Reply to Re: Massive problem with output buffering

Your name:

Reply:


Posted by Jerry Stuckle on 11/22/07 04:23

jools@by.com wrote:
> In article <op.t1516dhu5bnjuv@metallium.lan>, luiheidsgoeroe@hotmail.com
> says...
> You said you did output some filecontents, not the name of a fil=
>> e. =
>>
>> In this case, there's practically no way the user wil ever be able to =
>>
>> download the image. An HTML tag is NOT sending the image, it's just =
>>
>> telling the browser where it can be fetched.
>>
>> If you need an dynamically created image displayed only once, and not =
>>
>> saved permanently as a file, point the HTML src attribute to a PHP scrip=
>> t, =
>>
>> possibly with some GET variables, and let that script output an image, =
>>
>> using the GD or ImageMagick libraries for instance.
>> -- =
>>
>> Rik Wasmus
>
> No Rik thats not correct - my fault - The image is not dynamically
> created its a file on the disk that is delete after use. It was the text
> file I created.
>
> Consider - these are the cases:
> If the link is not relative to the CWD the image is sent fine and deleted
> afterwards. Everything works as I want it to. (Except I need the images
> elsewhere)
>
> If the image is at a relative location to CWD and the image is deleted
> after it should have already been sent (or GET-ed if you like) - it is
> never seen.
>

That is correct operation. The img tag is a directive to the browser to
load the image. However, right after creating the image, you unlink the
file. So when the browser requests the file, it no longer exists.

> If it is at that relative location - and NOT deleted it is sent fine.
>

Correct operation.

> The only thing that has changed between working and not working is the
> image location from . to ../ or any other relative location.
>

You also have to figure caching in here. It may or may not be involved.
But don't delete a file before it's being used.


Probably the best would be to have the img point to a PHP file which
serves the image then deletes it.

> This is why I'm still confused.
>
> thanks
> -jools-
>
>
>
>
>
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация