Hilfe bei session weitergabe

Fragen zu allen Themen rund ums Programmieren außerhalb von phpBB können hier gestellt werden - auch zu anderen Programmiersprachen oder Software wie Webservern und Editoren.
Antworten
Dave
Mitglied
Beiträge: 2085
Registriert: 25.05.2003 15:03
Wohnort: Wuppertal

Hilfe bei session weitergabe

Beitrag von Dave »

Hi

im CH wird die funktion url benutzt:

Code: Alles auswählen

function url($basename, $parms=array(), $add_sid=false, $fragments='', $force=false, $external=false)
	{
		global $SID;
		static $script_path;

		echo $SID;
		$url_parms = '';
		if ( $add_sid && empty($parms['sid']) )
		{
			$parms['sid'] = substr($SID, strlen('sid='));
		}

		if ( !empty($parms) )
		{
			foreach ( $parms as $key => $val )
			{
				if ( !empty($key) && (!empty($val) || $force) )
				{
					$url_parms .= (empty($url_parms) ? '?' : '&') . $key . '=' . $val;
				}
			}
		}
		if ( !empty($fragments) )
		{
			$url_parms .= (empty($url_parms) ? '?#' : '#') . $fragments;
		}
		if ( $external && empty($script_path) )
		{
			$script_path = $this->get_script_path();
		}
		return ($external ? $script_path : trim(ereg('^\.\/', $this->root) && $add_sid ? preg_replace('#^(\.\/)(.*)$#', '\2', $this->root) : $this->root)) . $basename . '.' . $this->ext . $url_parms;
	}
Nur habe ich nun das Problem das die session id nie mit gegeben wird. Was ich nun nicht verstehe ist dieser Teil:

Code: Alles auswählen

$parms['sid'] = substr($SID, strlen('sid='));
kann mir da jemand helfen?


MfG
Shadow-Dragon
Antworten

Zurück zu „Coding & Technik“