Home » » session_set_cookie_params

session_set_cookie_params

Written By 1 on Monday, October 1, 2012 | 6:23 PM

void session_set_cookie_params ( int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false ]]]] )
Set the session cookie parameters
Set cookie parameters defined in the php.ini file. The effect of this function only lasts for the duration of the script. Thus, you need to call session_set_cookie_params() for every request and before session_start() is called.

 
<?php
session_set_cookie_params(0,"/webapp/");
session_start();
?>
5.2.0 The httponly parameter was added. 4.0.4 The secure parameter was added.

0 Comment:

Post a Comment