session_get_cookie_params
(PHP 4, PHP 5, PHP 7, PHP 8)
session_get_cookie_params — Lee la configuración del cookie de sesión
Descripción
function session_get_cookie_params():
array
Lee la configuración del cookie de sesión.
Parámetros
Esta función no contiene ningún parámetro.
Valores devueltos
Devuelve un array, que contiene los siguientes elementos:
-
"
lifetime":
duración de vida del cookie.
-
"
path":
la ruta donde se almacenan las informaciones.
-
"
domain":
el dominio del cookie.
-
"
secure":
el cookie debe ser enviado solo en conexiones seguras.
-
"
httponly":
el cookie será accesible solo vía el protocolo HTTP.
-
"
samesite":
Controla el envío entre dominio (cross-domain) del cookie.
Historial de cambios
| Versión |
Descripción |
| 7.3.0 |
La entrada "samesite" ha sido añadida en el array devuelto.
|
mmchristian at gmail dot com ¶ 10 years ago
It should be noted that this gets the session cookie ini file parameters, not the parameters from the cookie itself.
ie. if you set the cookie lifetime using session_set_cookie_params(12345) and then try to use session_get_cookie_params, you will not get back 12345. Instead, you will get the lifetime set in the ini file.