NYCPHP Meetup

NYPHP.org

[nycphp-talk] object buffering

Chris Shiflett shiflett at php.net
Wed Jul 23 16:03:11 EDT 2003


--- Willliam Klein <willie at pdfsystems.com> wrote:
> Is there a way to store the entire output os a php page to be
> emailed later?

Sure.

> I was thinkingsomething like:
> 
> op_start("showOPA.php");
> $blah=op_get_content();
> echo $blah;

The functions are ob_start() and ob_get_content(). Note the ob (for output
buffering) rather than op.

Also, to start buffering, just do this:

ob_start();

I'm guessing you just meant to include showOPA.php or something. Otherwise,
your example will work up to the point where the output is stored in $blah. You
can then write that to a file, email it, or whatever.

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/



More information about the talk mailing list