php - headers_sent() return false, but headers were sent -
my code simple:
<!doctype html> <html> <head> ... <?php var_dump(headers_sent()); ?>
it returns false. shouldn't headers sent after printed? after first <
character.
it depends if output_buffering
directive in php.ini
file. if off
output_buffering = off
then echo headers_sent()
should output 1
in other cases, headers_sent()
won't output results because false. headers won't sent because output buffered.
if want around , force-send headers, can use flush()
.
hope helps!
Comments
Post a Comment