Zillis-Web
Guest
In der Datei class.JTL- Shop.Grafik.php ist der öffnende phpTag 
	
	
	
		
sollte aber der sauber so aussehen
	
	
	
		
 und der schließende phpTag 
	
	
	
		
fehlt völlig.
Dadurch kam es bei mir zu folgenden Fehlern:
Am Anfang der Startseite wurde dieser Code angezeigt
	
		
und beim Quelltext wurde der Inhalt der Datei class.JTL-Shop.Grafik.php noch vor dem Doctype ausgegeben.
			
			
		PHP:
	
	<? ...
		PHP:
	
	<?php ...
		PHP:
	
	... ?>Dadurch kam es bei mir zu folgenden Fehlern:
Am Anfang der Startseite wurde dieser Code angezeigt
		HTML:
	
	cCacheDir = 'templates_c';        $this->cFontDir = PFAD_ROOT . PFAD_FONTS;               $this->cFont = $cFont;       $this->nSize = $nSize;       $this->cColor = $cColor;    }        function html2rgb($cColor)    {       if ($cColor[0] == '#')          $cColor = substr($cColor, 1);        if (strlen($cColor) == 6)          list($r, $g, $b) = array($cColor[0].$cColor[1],                                   $cColor[2].$cColor[3],                                   $cColor[4].$cColor[5]);       elseif (strlen($cColor) == 3)          list($r, $g, $b) = array($cColor[0].$cColor[0],                                    $cColor[1].$cColor[1],                                    $cColor[2].$cColor[2]);       else          return false;                 $r = hexdec($r); $g = hexdec($g); $b = hexdec($b);       return array($r, $g, $b);    }     function calcRect($cText)    {       $box = ImageTTFBbox($this->nSize, 0, $this->cFontDir . '/' .  $this->cFont, $cText);       $width = abs($box[2] - $box[0]);       $height = abs($box[7] - $box[1]);       $x = $box[6] * -1; $y = $box[5] * -1;       return array($width, $height, $x, $y);    }        function calcMax($cText)    {       for ($i = 0; $i < strlen($cText); $i++)       {          $wh = $this->calcRect($cText[$i]);                    if ($this->nMaxWidth < $wh[0])             $this->nMaxWidth = $wh[0];                       $this->nMinWidth = $this->nMaxWidth;                    if ($this->nMinWidth > $wh[0])             $this->nMinWidth = $wh[0];                       if ($this->nMaxHeight < $wh[1])             $this->nMaxHeight = $wh[1];       }    }        function getCacheFilePath($cText)    {       $hash = md5($this->cFont . $this->nSize . $this->cColor .  $cText) . '.png';       return $this->cCacheDir . '/' . $hash;    }        function getImageFilePath($char)    {         $wh = $this->calcRect($char);       $cColor = $this->html2rgb($this->cColor);       if (!is_array($cColor))          $cColor = array(0, 0, 0);              $filePath = $this->getCacheFilePath($char);       if (!is_file($filePath))       {          $image = @ImageCreate($wh[0] + $this->nPadding,  $this->nMaxHeight + $this->nPadding);          $background = ImageColorAllocate($image, 255, 255, 255);          $cTextColor = ImageColorAllocate($image, $cColor[0],  $cColor[1], $cColor[2]);                    ImageColorTransparent($image, $background);          ImageTTFText($image, $this->nSize, 0, $wh[2] +  $this->nPadding / 2, $this->nMaxHeight + $this->nPadding / 2,                        $cTextColor, $this->cFontDir . '/' .  $this->cFont, $char);          ImagePNG($image, $filePath);       }              return $filePath;    }        function asArray($cText)    {       $list = array();       $this->calcMax($cText);        for ($i = 0; $i < strlen($cText); $i++)       {          if ($cText[$i] == ' ')             $list[] = false;          else             $list[] = $this->getImageFilePath($cText[$i]);       }              return $list;    }        function asHTML($cText)    {       $html = '';       $list = $this->asArray($cText);       $width = ($this->nMaxWidth + $this->nMinWidth) / 2;       foreach ($list as $l)       {          if ($l)             $html .= '[IMG]http://localhost/Kunststube-Shop/%27%20.%20$l%20.%20%27[/IMG]';          else             $html .= '';//'[IMG]http://localhost/Kunststube-Shop/blank.png[/IMG]';       }                 return $html;    } }