miniflux-legacy/miniflux/vendor/PicoFarad/Session.php

30 lines
415 B
PHP
Raw Normal View History

2013-02-18 03:48:21 +01:00
<?php
namespace PicoFarad\Session;
const SESSION_LIFETIME = 2678400;
function open($base_path = '/')
{
session_set_cookie_params(SESSION_LIFETIME, $base_path, null, false, true);
session_start();
}
function close()
{
session_destroy();
}
function flash($message)
{
$_SESSION['flash_message'] = $message;
}
function flash_error($message)
{
$_SESSION['flash_error_message'] = $message;
}