How can session_set_cookie_params() be used to set the session cookie parameters in PHP?

To set the session cookie parameters in PHP, you can use the session_set_cookie_params() function. This function allows you to specify various parameters such as the cookie lifetime, path, domain, secure flag, and httponly flag for the session cookie. By setting these parameters, you can customize the behavior of the session cookie to meet your application's requirements.

// Set the session cookie parameters
session_set_cookie_params(3600, '/', '.example.com', true, true);

// Start the session
session_start();