header() 最常被拿來送 header('Location: /'); 等等, 做網頁導向的動作.
除了這些動作外, 還有 setcookie(), header()... 等, 這些 function 在執行前, 頁面上都不能有任何輸出(空白也不行), 若有任何輸出, 就會有下述的錯誤訊息:
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at /var/www/test.php:5) in <b>/var/www/test.php</b> on line <b>6</b><br />