note 115804 deleted from function.header by crell
| From: | crell@php.net | Date: | Thu, 19 May 2022 16:19:18 +0000 |
| Subject: | note 115804 deleted from function.header by crell | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-218501@lists.php.net to get a copy of this message | ||
Note Submitter: dheeraj dot br2 at gmail dot com
----
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