session_save_path

string session_save_path(string session_path) 

Retrieves or sets the session file path.

Returns:

Current session file path

Description:

Retrieves or sets the directory in which session information is stored. The default is /tmp; this default value can be altered in the PHP initialization file.

Version:

Existing since version 4.0

Example:

Show session path
session_start(); 
echo "Session save path is ", session_save_path(); 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.