protected function readFile()
	{
		// construct the session file name
		$file = $this->config['file']['path'].$this->config['file']['cookie_name'].'_'.$this->sessionId;

		if (is_file($file) and $handle = fopen($file,'r'))
		{
			// wait for a lock
			while ( ! flock($handle, LOCK_SH));

			if ($size = filesize($file))
			{
				// read the session data
				$payload = fread($handle, $size);
			}
			else
			{
				// file exists, but empty?
				$payload = false;
			}

			//release the lock
			flock($handle, LOCK_UN);

			// close the file
			fclose($handle);

			// return the loaded payload
			return $payload;
		}

		// session file did not exist or could not be opened
		return false;
	}
protected function readFile()
	{
		// construct the session file name
		$file = $this->config['file']['path'].$this->config['file']['cookie_name'].'_'.$this->sessionId;

		if (is_file($file) and $handle = fopen($file,'r'))
		{
			// wait for a lock
			while ( ! flock($handle, LOCK_SH));

			if ($size = filesize($file))
			{
				// read the session data
				$payload = fread($handle, $size);
			}
			else
			{
				// file exists, but empty?
				$payload = false;
			}

			//release the lock
			flock($handle, LOCK_UN);

			// close the file
			fclose($handle);

			// return the loaded payload
			return $payload;
		}

		// session file did not exist or could not be opened
		return false;
	}
protected function readFile ( ) { // construct the session file name $ file = $ this -> config [ 'file' ] [ 'path' ] . $ this -> config [ 'file' ] [ 'cookie_name' ] . '_' . $ this -> sessionId ; if ( is_file ( $ file ) and $ handle = fopen ( $ file , 'r' ) ) { // wait for a lock while ( ! flock ( $ handle , LOCK_SH ) ) ; if ( $ size = filesize ( $ file ) ) { // read the session data $ payload = fread ( $ handle , $ size ) ; } else { // file exists, but empty? $ payload = false ; } //release the lock flock ( $ handle , LOCK_UN ) ; // close the file fclose ( $ handle ) ; // return the loaded payload return $ payload ; } // session file did not exist or could not be opened return false ; }
Reads the session file

@return string|boolean
Reads the session file