note 128883 added to function.session-set-cookie-params

From: Date: Thu, 14 Sep 2023 11:28:19 +0000
Subject: note 128883 added to function.session-set-cookie-params
Groups: php.notes 
Request: Send a blank email to php-notes+get-220843@lists.php.net to get a copy of this message
As per version PHP 7 session_start can include an option array this function became obsolete. All cookie settings (and many more) can be included in an option array as a parameter to session_start(): <?php session_start( [ 'cookie_path' => '/', 'cookie_lifetime' => 300, 'cookie_secure' => true, 'cookie_httponly' => true, 'cookie_samesite' => 'lax', ] ); ---- Server IP: 45.112.84.4 Probable Submitter: 45.91.157.134 (proxied: 46.140.241.51) ---- Manual Page -- https://php.net/manual/en/function.session-set-cookie-params.php Edit -- https://main.php.net/note/edit/128883 Del: integrated -- https://main.php.net/note/delete/128883/integrated Del: useless -- https://main.php.net/note/delete/128883/useless Del: bad code -- https://main.php.net/note/delete/128883/bad+code Del: spam -- https://main.php.net/note/delete/128883/spam Del: non-english -- https://main.php.net/note/delete/128883/non-english Del: in docs -- https://main.php.net/note/delete/128883/in+docs Del: other reasons-- https://main.php.net/note/delete/128883 Reject -- https://main.php.net/note/reject/128883 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#220843) next »