Re: printing out messages while processing a file
| From: | Jason Wong | Date: | Wed, 23 Jun 2004 08:59:36 +0000 |
| Subject: | Re: printing out messages while processing a file | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-188857@lists.php.net to get a copy of this message | ||
On Wednesday 23 June 2004 14:41, Greg Donald wrote:
> On Wed, 23 Jun 2004 08:34:17 +0200, Merlin <news.groups@web.de> wrote:
> > I am writing a backup_restore file which creates directories and picture
> > files with different resolutions out of an original file.
> >
> > After each process completes I would like to print out a [ok] message,
> > but unfortunatelly it prints those msg out only when the script is
> > completely through and done.
> >
> > How can I echo out status messages?
> >
> > The script is run by console php. ( I also noticed that \n or <br> does
> > not work for the console?!)
>
> $stdout = fopen('php://stdout', 'w');
> fwrite($stdout, "status message goes here\r\n");
Alternatively you can set 'output_buffering = Off' in php.ini and just carry
on using echo/print.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Be both a speaker of words and a doer of deeds.
-- Homer
*/