php startsession code example
Example 1: php string starts with
//php check if first four characters of a string = http
substr( $http, 0, 4 ) === "http";
//php check if first five characters of a string = https
substr( $https, 0, 5 ) === "https";
Example 2: session start php
<?php
// This sends a persistent cookie that lasts a day.
session_start([
'cookie_lifetime' => 86400,
]);
?>