20110427

header() and session_start()

使用header()時,要寫在所有網頁輸出"內容"(echo、print...)前,因為所有的輸出都屬於內容裡的,而又在前,所以PHP會強制且你不會知道的先輸出header(),而造成錯誤。另外使用location標頭時,通常會接die()或exit,忽略後面程式。
session_start()也是如此。



function.header
範例

沒有留言: