php - Test if session is started -


How do you check whether sessions are started or not? This is not the way ...

  session_start (); If (isset ($ _ session)) {echo "sessions"> 
} And {echo "session closed
"; } Session_destroy (); If (isset ($ _ session)) {echo "sessions">
} And {echo "session closed
"; }

Try it out:

if (session_id ())


Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -