943,981 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 12649
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Jun 4th, 2007
0

Re: Cannot modify header information.Headers already sent

Hiii
ob_start -- Turn on output buffering
That means no output is sent from the script except from the headers. Instead it's stored in the internal buffer.

Click to Expand / Collapse  Quote originally posted by Pro2000 ...
Peace, Could I know what is the function ob__start(); ?
Thanks.
Best regards.
Reputation Points: 10
Solved Threads: 0
Light Poster
php_coder is offline Offline
34 posts
since Dec 2006
Jun 4th, 2007
0

Re: Cannot modify header information.Headers already sent

Click to Expand / Collapse  Quote originally posted by Pro2000 ...
Peace, Could I know what is the function ob__start(); ?
Thanks.
Best regards.
Heres the reference at php.net: http://www.php.net/ob_start

ob_start() is part of the output control functions in PHP. See: http://www.php.net/manual/en/ref.outcontrol.php

Calling ob_start() begins the buffer of output that is normally sent to HTTP (with PHP on a webserver).

Do to the HTTP specification, you cannot send any HTTP Headers after you have sent some HTTP Content. ob_start() allows you to have the HTTP Content placed in a buffer, so that you can send HTTP headers at any time. Then at the end of your PHP script, call ob_end_flush() which will flush the HTTP Content.

Edit: Looks like php_coder got to your question first.
Last edited by digital-ether; Jun 4th, 2007 at 11:29 am.
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: To Professionals only
Next Thread in PHP Forum Timeline: BCC: Multiple Recipient





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC