php check if session is running

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
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?>