FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Order/Timing of Execution of PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Order/Timing of Execution of PHP [message #176155 is a reply to message #176153] Mon, 28 November 2011 00:53 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
Denis McMahon wrote:

> On Sun, 27 Nov 2011 12:01:47 +0000, Jeff Gaines wrote:
>> It works but doesn't echo 'Creating Thumbnails' etc. until it has called
>> the function and returned from it.
>
> Possibly caused by buffering on the server, or even the client waiting to
> render output until it's able to decide what is to be rendered and how?
>
> I think it's better to do all the processing first, and then send the web
> page afterwards, rather then send html in dribs and drabs while you're
> doing the processing. This isn't the way I used to think, but it has
> advantages. For example, you can trap and react to errors in the
> processing by issuing http error headers, which you can't do if you've
> started output.

The disadvantage of it is that the user would have to wait for all PHP
processing to finish before seeing any content. I have recently heard of an
approach to mitigate, even solve, this problem, but I do not remember how it
worked.


PointedEars
--
> If you get a bunch of authors […] that state the same "best practices"
> in any programming language, then you can bet who is wrong or right...
Not with javascript. Nonsense propagates like wildfire in this field.
-- Richard Cornford, comp.lang.javascript, 2011-11-14
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Stats comp.lang.php (last 7 days)
Next Topic: Associative Array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 09:56:45 GMT 2024

Total time taken to generate the page: 0.06284 seconds