note 117936 added to function.session-abort
| From: | parsa dot mhn at outlook dot com | Date: | Thu, 03 Sep 2015 14:33:53 +0000 |
| Subject: | note 117936 added to function.session-abort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203616@lists.php.net to get a copy of this message | ||
To better understand this function you should execute this code first :
<?php
// First of all choose your path , For e.g. C:/session
session_save_path('Your Path here !');
session_start();
// Define a Session Variable
$_SESSION['Key'] = 'value' ;
Var_dump(session_status() == PHP_SESSION_ACTIVE);
// Output : bool(True) , it means you have an open session !
?>
Then you should execute this code :
<?php
// Choose the path that you used it in first part
session_save_path('Your path here');
session_start();
// If you want to close session and keep your original data in your path , you should use
session_abort()
session_abort();
var_dump(session_status()== PHP_SESSION_ACTIVE);
// Output : bool(False) , it means your session closed .
?>
So if you have an open session , session_abort() will simply close it without effecting the external
session data , so you can reload your data again from your path that you chose .
----
Server IP: 72.52.91.14
Probable Submitter: 151.245.86.203
----
Manual Page -- http://php.net/manual/en/function.session-abort.php
Edit -- https://master.php.net/note/edit/117936
Del: integrated -- https://master.php.net/note/delete/117936/integrated
Del: useless -- https://master.php.net/note/delete/117936/useless
Del: bad code -- https://master.php.net/note/delete/117936/bad+code
Del: spam -- https://master.php.net/note/delete/117936/spam
Del: non-english -- https://master.php.net/note/delete/117936/non-english
Del: in docs -- https://master.php.net/note/delete/117936/in+docs
Del: other reasons-- https://master.php.net/note/delete/117936
Reject -- https://master.php.net/note/reject/117936
Search -- https://master.php.net/manage/user-notes.php