Home > PHP > Custom Session folder

Custom Session folder

October 8th, 2009

You can change session save path to custom folder.

Example:

1) Created “sessions” folder in public_html with 777 permissions.
2) edit .htaccess file in public_html folder with following line
php_value session.save_path /home/truthf70/public_html/sessions/

3) Created simple php file with code and test it.

Quote:
<?php
$s_path = session_save_path();
echo $s_path;
?>


Now session path set to “sessions” folder.

PHP

  1. No comments yet.
  1. No trackbacks yet.