destrroy a session php
session_destroy(); // To delete whole session
// OR
unset($_SESSION['myVar']); // To delete a session var<?php
// Destroy the currently active session.
session_destroy();
?><?php
// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
$params = session_get_cookie_params();
setcookie(session_name(), '', time() - 42000,
$params["path"], $params["domain"],
$params["secure"], $params["httponly"]
);
}
// Finally, destroy the session.
session_destroy();
?>
Also in PHP:
- Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\PPETrackerApp\email.php on line 21
- create random unique string
- fetch today data in php
- binary base64 decode php
- disable errors php
- echo ternary php
- ReactPHP
- artisan route:list
- acf group
- cache laravel
- check if letter is in string php
- Get the full url of the page in php
- current time input field in laravel form
- buddy group hide notice join
- convert uppercase in php
- dateFormat php
- check if includes numbers php
- ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first! Considering conflict mpm_worker for mpm_prefork: ERROR: Could not enable dependency mpm_prefork for php7.2, aborting
- "Fatal error: Allowed memory size of 1610612736 bytes exhausted " +laravel
- current data in php
- download laravel 8.x
- conteneur d'injection de dépendance php
- convert multidimensional array to single array php
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 20480 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 64