You are here: Re: [PHP] Question about apache-php concurrent process control « PHP « IT news, forums, messages
Re: [PHP] Question about apache-php concurrent process control

Posted by Robert Cummings on 07/22/05 06:45

http://ca.php.net/manual/en/function.register-shutdown-function.php

Cheers,
Rob.

On Thu, 2005-07-21 at 23:40, Liang ZHONG wrote:
> I now encounter a problem with flow control of my program with PHP. This is
> very crucial to the design of a pretty big project. This is what I want to
> do in the program:
>
> <?php
> do_A();
> header("Location: ".$result_of_do_A);
> do_B();
> ?>
>
> Since it takes do_B() quite a while to finish, so I want the http client
> get the partial result from do_A() by redirect a page to them before start
> do_B(). But it seems that the redirection will only occure after the entire
> php program finishes, i.e., after do_B(). I sent http request through
> browser, curl comman line with -N (no buffer) option and with a perl LWP
> program I wrote. All of them suggest that header(), although is put before
> do_B() in code, gets executed only after all the php code finished. I add
> flush() after header() too, but no work.
>
> My question is: Is there any way that I can return to the client though http
> response and then continue my progress with my program?
>
> Thank you very much for your kindly help.
--
..------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'

 

Navigation:

[Reply to this 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

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