Re: [PHP4BETA] Session Types

[email protected] (Curt Zirzow)
Newsgroups php.version4
Message-ID <[email protected]>
* Brian T. Allen ([email protected]) [000523 12:07]:
> Also, is it possible to set a cookie after information has been displayed to
> the page, or can it only be done in the headers, before output?

Here are some functions that are undocumented (or at least very hard to
find on the documentation pages) on the site so I don't know if they are
official or not. You can buffer your output send headers all the way to 
the end of the script and then flush the output.  You can not however
buffer headers.


void ob_start(void)
  Turn on output buffering
 
void ob_end_flush(void)
  Flush (send) the output buffer, and turn off output buffering
 
void ob_end_clean(void)
  Clean (erase) the output buffer, and turn off output buffering
 
sting ob_get_contents(void)
  Return the contents of the output buffer
 
void ob_implicit_flush([int flag])
  Turn implicit flush on/off and is equivalent to callin flush() after
  every output call
 
  flag values:
    true  -turns flushing on (default)
    false -turns flushing off                                                     



-- 
Any time things appear to be going better, you have overlooked
something.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.