Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check if session is running

<?php
if(session_status() == PHP_SESSION_ACTIVE){
    //a session is already running
    session_destroy(); //stops the session
}
?>
Comment

check if session is started

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
Comment

php check if session is running

<?php
if(session_status() == PHP_SESSION_ACTIVE){
    //a session is already running
    session_destroy(); //stops the session
}
?>
Comment

check if session is started

if (session_status() === PHP_SESSION_NONE) {
    session_start();
}
Comment

PREVIOUS NEXT
Code Example
Php :: session_destroy not working 
Php :: php is numeric 
Php :: the configuration file now needs a secret passphrase (blowfish_secret) 
Php :: get_posts category 
Php :: total no of occurances in string php 
Php :: encryption key has not encrypted laravel 
Php :: kill php process 
Php :: how to add hour minute seconds in php datetime 
Php :: delete cache laravel 
Php :: php convert unix time to date 
Php :: laravel mix disable notifications 
Php :: two digits after decimal point in php 
Php :: get product category url woocommerce 
Php :: decode jwt token laravel 
Php :: PHPspreadsheet getColumnDimension 
Php :: php array_map with anonymous function 
Php :: PHP strncmp — Binary safe string comparison of the first n characters 
Php :: Add Laravel .env variable to Vue component 
Php :: laravel get last 5 records 
Php :: TreeBuilder::getRootNode()" before creating the root node is not supported, migrate to the new constructor signature instead. 
Php :: while loop in laravel 
Php :: calculate time difference php 
Php :: php sum array elements 
Php :: ubuntu php7.4-curl : Depends: libcurl3 (= 7.44.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. 
Php :: php convert date from dd/mm/yyyy to yyyy-mm-dd 
Php :: laravel access controller method from another controller 
Php :: how to mantain text in form after error php 
Php :: php file read 
Php :: qual é a melhor linguagem de 
Php :: PHP strrchr — Find the last occurrence of a character in a string 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =