Location: PHPKode > scripts > Private Sessions > file_sample.php

  // Include the class source.
  require_once 'private_sessions.class.php';

  // Create an object.
  $ps = new private_sessions();

  // Store session data in disk files.
  $ps->save_to_db = false;

  // The path of the directory used to save session data. No trailing slashes.
  $ps->save_path = realpath('.') . '/ps_sess_tmp';

  // Set up session handlers.

  // That's all! Proceed to use sessions normally.
  echo $_SESSION['foo'] = 'Hi there!';

Return current item: Private Sessions