This is the very useful function when you want to get or set your session save path. This function takes only one parameter which is option. This function will used to both set and get the session save path.
Session save path is path to any directory which will be used to save your session values.
To get the current session save path you just need to call this function without passing any parameter just like below code.
To set the session save path you will just need to call the same function with parameter which is path of directory. Once you call this function your application’s session save path will get changed so it is good to set this path before calling the session_start(). Have a look at the below code block to set the session save path.
This function will be very handy if you want to store the user related session on any folder which is on web server. You can share your thought if you have used this function on any other way.
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash