/** * Inicia a sessão no php */ public static function start($Module = null) { if (!session_id()) { $config = get_config('project'); self::$_SESSION_ = $config['name']; $path = ABSPATH . '/temp/session'; if (!file_exists($path)) { mkdir($path, 0777); chmod($path, 0777); } if ($Module) { $path .= '/' . $Module; if (!file_exists($path)) { mkdir($path, 0777); chmod($path, 0777); } } session_cache_expire($config['sessiontime']); session_save_path($path); session_start(); # Iniciando array if (!isset($_SESSION[self::$_SESSION_])) { $_SESSION[self::$_SESSION_] = []; } } }