Reply to Re: [PHP] selfreferencing script with output

Your name:

Reply:


Posted by "Gustav Wiberg" on 09/25/05 13:00

----- Original Message -----
From: "Silvio Porcellana" <sporc@tin.it>
To: "PHP general" <php-general@lists.php.net>
Sent: Sunday, September 25, 2005 12:13 AM
Subject: Re: [PHP] selfreferencing script with output


> Sabine wrote:
>
>> Thanks for your answer, Gustav,
>>
>> now I see I didn't explain good enough what my problem is.
>> My problem is not how to construct a status bar, but not it is
>> possible to provide any output before the headering (*Warning*: Cannot
>> modify header information - headers already sent by). Neither after it.
>>
>> Best regards
>> Sabine
>>
>> P.S.: I played around with PEARs HTML_Progress. It's really worth
>> trying. The user doc on Laurent Lavilles page provides a lot of
>> explanation and examples.
>> (http://pear.laurent-laville.org/HTML_Progress/).
>>
> Hi Sabine
> why don't you try an AJAX approach? (Kinda like GMail and stuff like
> that?)
>
> You can create a DIV in your page that contains the *output* (maybe an
> image with the width set to the percentage of mails sent): the content
> of this DIV is updated by another script (the one that sends the email)
> that gets called (via JavaScript) at specific intervals with a specific
> query (in your case, the messages to send). This way your main page
> never gets reloaded and you see a nice progress bar in your DIV.
>
> I know it sounds a bit difficult, but it's a cool "technology" and after
> the initial difficulties it can be really useful. As a start, have a
> read here: http://en.wikipedia.org/wiki/AJAX
>
> HTH, cheers!
> Silvio
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.11.6/111 - Release Date: 2005-09-23
>
>
Look at the functions ob_start() and ob_flush()..

Something like:

<?php
ob_start();

HEADER("Location: test.php");

ob_flush();
?>

/G
http://www.varupiraten.se/

[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

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