PHP Output Buffer

Part of: PHP Actions

Versions

Pro Only

Description

When a PHP script generates a page, it is sometimes helpful to suspend the output of headers to the browser until the entire script has finished.

If your script tries to redirect a visitor to a new page after some headers have already been sent to the browser, the script will fail with an error message.

PHP provides a helpful mechanism called Output Buffers that will let you work around this problem. It does so by letting the entire script execute without sending any headers to the browser until an explicit command is given to send the results.

This action wraps the page in the appropriate tags, which look like this:

<?PHP ob_start(); ?>
...your page here...
<?PHP ob_end_flush(); ?>

Simply apply the Action to a PHP page in Freeway, and the necessary code will be inserted.

  Register or log in to add tags

Register or log in to view or add comments.

FreewayTalk

Join the friendliest community on the Net at FreewayTalk. Ask and answer questions about Softpress Freeway, or just gather around the virtual water cooler!