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_save_path

Trieda

Koreň \ Bez triedy

Metóda - session_save_path

(PHP 4, PHP 5, PHP 7)

The function is used for getting or editing the location for storing session files.

Note: If you are editing the location, you have to do it before calling session_start().

Procedurálne

Parametre

NázovDátový typPredvolená hodnotaPopis
$pathstring

The new location for storing session files.

Mávratovej hodnoty

Vracia: string

Returns the current location. If a new location is given, the function updates it and returns the old location.

Príklady

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

$previous = session_save_path('./sessions');
echo 'Current session files location is ' . session_name() . '. The previous location was ' . $previous;

// Now sessions will be saved into the "sessions" folder in the current directory

Súvisiace manuály

        Aktivity