PHP session_save_path() Function

What is session_save_path Function?

Explanation

The "session_save_path()" function is used to get or set the current session file path .

Syntax:


session_save_path(path)

In the above syntax, one can get the session file path or even set the path using "path", which changes the current session file path.

Example :


<?php
session_start();
echo "Session save path is ", session_save_path();
?>
Result :

windowstmp

In the above example the path of the current session file "windowstmp" is displayed.

PHP Topics


Ask Questions

Ask Question