O'Reilly logo

PHP 5 CMS Framework Development by Martin Brampton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a session

The real work of creating a session is done in the constructor of the abstract class aliroSession. You will recall that the concrete class constructors called the parent constructor. It works like this:

protected function __construct() { $this->time = time(); if ('crontrigger' == @$_REQUEST['option']) return true; ini_set('session.use_cookies', 1); ini_set('session.use_only_cookies', 1); $name = md5('aliro_'.$this->_prefix.$this->getIP(). _ALIRO_ABSOLUTE_PATH); session_name($name); if (!session_id()) { $sh = aliroSessionData::getInstance(); session_set_save_handler(array($sh,'sess_open'), array($sh,'sess_close'), array($sh,'sess_read'), array($sh,'sess_write'), array($sh,'sess_destroy'), array($sh,'sess_gc')); session_start(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required