|
Posted by sunnyboyGuo on 01/09/08 13:11
On Jan 9, 8:40 pm, Janwillem Borleffs <j...@jwscripts.com> wrote:
> sunnyboy...@gmail.com schreef:
>
> > when there occured some error, it will send headers automatically, so
> > i can not use header() to send expected header information.
> > it will prompt message like this:
> > <br />
> > <b>Warning</b>: Cannot modify header information - headers already
> > sent by (output started at /var/www/tpms.php:155) in <b>/var/www/
> > tpms.php</b> on line <b>25</b><br />
>
> > can i control it not send automatically, and to send myself header
> > information?
>
> You can use the PHP4 method to surpress the error (with the @-sign) or
> alter the error_reporting setting (ini file or through the
> error_reporting function) to E_FATAL (or one of the other possible
> values/combinations; seehttp://www.php.net/error_reportingfor details).
>
> You can also disable the display_errors directive in your php.ini file.
>
> JW
Hi JW,
maybe i did not describe clearly. i want to surpress php to send
header automaticlly, but send
header by myself.
when i use error_reporting(0) to surpress errors, it can surpress
them, but the function call header(HTTP/1.1 400 Not FOUND) didn't
rewrite the header. i think php may send header before the call, but
its warning was surpressed.
Best regards,
Tony
[Back to original message]
|