note 115804 added to function.header
| From: | dheeraj dot br2 at gmail dot com | Date: | Fri, 26 Sep 2014 05:50:41 +0000 |
| Subject: | note 115804 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-200528@lists.php.net to get a copy of this message | ||
The piece of code in the manual which is as follows
<html>
<?php
/* This will give an error. Note the output
* above, which is before the header() call */
header('Location: http://www.example.com/');
exit;
?>
this will not throw a warning as the .ini settings for output buffering is by default on.
to get the error you may have to change the server setting or simply add a line explicitly to close
output buffering by using "ob_end_clean()" or similar
----
Server IP: 103.21.58.218
Probable Submitter: 103.227.96.39
----
Manual Page -- http://php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/115804
Del: integrated -- https://master.php.net/note/delete/115804/integrated
Del: useless -- https://master.php.net/note/delete/115804/useless
Del: bad code -- https://master.php.net/note/delete/115804/bad+code
Del: spam -- https://master.php.net/note/delete/115804/spam
Del: non-english -- https://master.php.net/note/delete/115804/non-english
Del: in docs -- https://master.php.net/note/delete/115804/in+docs
Del: other reasons-- https://master.php.net/note/delete/115804
Reject -- https://master.php.net/note/reject/115804
Search -- https://master.php.net/manage/user-notes.php