What is the purpose of the 'enable-trans-sid' option in PHP and how does it affect session management?

The 'enable-trans-sid' option in PHP allows for transparent session ID passing in URLs. This can be useful for maintaining session state across pages when cookies are disabled. However, it can also pose security risks as session IDs are exposed in URLs, making them vulnerable to session hijacking attacks. It's generally recommended to disable this option for better security.

ini_set('session.use_trans_sid', 0);