NOVINKA: Najžiadanejšie rekvalifikačné kurzy teraz s 50% zľavou + kurz AI ZADARMO. Nečakaj, táto ponuka dlho nevydrží! Zisti viac:

PHP - session_name

Trieda

Koreň \ Bez triedy

Metóda - session_name

(PHP 4, PHP 5, PHP 7)

The function is used for getting or editing the current session name.

Procedurálne

Parametre

NázovDátový typPredvolená hodnotaPopis
$namestring

The new session name.

Mávratovej hodnoty

Vracia: string

Returns the name of the current session. If a new name is given, the function updates the session name and returns the name of the old session.

Príklady

<?php
echo session_name() . "\n";

$previous = session_name('MY_SESSION');
echo 'The current session name is ' . session_name() . '. The previous name was ' . $previous;

Súvisiace manuály

        Aktivity