check session php

Solutions on MaxInterview for check session php by the best coders in the world

showing results for - "check session php"
Hannah
16 Oct 2019
1// For PHP versions > 5.4.0
2
3if (session_status() === PHP_SESSION_NONE) {
4    session_start();
5}
6
7// For PHP Versions < 5.4.0
8
9if(session_id() == '') {
10    session_start();
11}
12