php check if session is running

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

showing results for - "php check if session is running"
Jana
07 Oct 2017
1<?php
2if(session_status() == PHP_SESSION_ACTIVE){
3    //a session is already running
4    session_destroy(); //stops the session
5}
6?>