Jump to content

Breaking Session - Solved With Our Thanks In The Final Post


niche

Recommended Posts

session_start(); re-activates the session even without session_write_close(). then, what's the advantage of using use session_write_close()?

Link to comment
Share on other sites

session_write_close() saves any changes made to the session and closes it. PHP does this automatically when a script ends, but when a location header is sent, the browser may redirect before the script has ended. If you don't call session_write_close() before sending a location header then changes to your session data may be lost.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...