php fehlersuche

Alles, was PHP betrifft, kann hier besprochen werden.

php fehlersuche

Postby cryzze » 22. February 2009 21:27

ich bekomme eine fehler meldung wenn ich meine php-datei öffnen möchte.
ich finde den fehler aber einfach nicht.

Warning: Wrong parameter count for imageline() in C:\...\05.php on line 51



Warning: Cannot modify header information - headers already sent by (output started at C:\...\05.php) in C:\...\05.php on line 71

ÿØÿà�JFIF������ÿþ�>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality
ÿÛ�C� 

 $.' ",#(7),01444'9=82<.342ÿÛ�C 

2!!22222222222222222222222222222222222222222222222222ÿÀ���d"�ÿÄ�����������
ÿÄ�µ���}�!1AQa"q2‘¡#B±ÁRÑð$3br‚
%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ��������
ÿÄ�µ��w�!1AQaq"2B‘¡±Á #3RðbrÑ
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ� ��?�Ù¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(�¢Š(ÿÙ


script:

<html>
<body>
<pre>
<?
/*
** JPeG-Button
**erzeugt grafische buttons
** aus formvariablen
*/

//parameter setzen, wenn sie nicht übergeben werden
if (!isset ($buttonwidth)) {
$buttonwidth = 100 ;
}

if (!isset ($buttonheight)) {
$buttonheight = 30 ;
}

if (!isset ($buttonLabel)) {
$buttonlabel = "CLICK" ;
}

if (!isset ($buttonFont)) {
$buttonFont = 5;
}

//Bild und Farben erzeugen
$image = imagecreate ($buttonwidth, $buttonheight) ;
$colorBody = imagecolorallocate ($image, 0x99, 0x99, 0x99) ;
$colorShadow = imagecolorallocate ($image, 0x33, 0x33, 0x33) ;
$colorHighlight = imagecolorallocate ($image, 0xCC, 0xCC, 0xCC) ;

//Rumpf bei Buttons
imagefilledrectangle($image, 1, 1, $buttonwidth-2,
$ButtonHeight-2, $colorBody) ;

//Schatten unten

imageline ($image, 0, $Buttonheigth-1, $buttonwidth-1,
$buttonheight-1, $colorshadow);

//schatten rechts
imageline ($image, $buttonwidth-1, 1, $buttonwidth-1,
$buttonheight-1, $colorshadow) ;

//oberes highlight
imageline ($image, 0, 0, $buttonwidth-1, 0, $colorhighlight) ;

//linkes highlight
imageline ($image, 0, 0, 0, $buttonheight-2, 0, $colorhighlight) ;

//labelgröße bestimmen
$buttonlabelheight = imagefontheight ($buttonfont) ;
$buttonlabelwidth = imagefontwidth ($buttonfont)
* strlen($buttonlabel);

//linke obere Ecke bestimmen
$buttonlabelx = ($buttonwidth - $buttonlabelwidth)/2;
$buttonlabely = ($buttonheight - $buttonlabelheight)/2;

//labelschatten
imagestring ($image, $buttonfont, $buttonlabelx+1,
$buttonlabely+1, $buttonlabel, $colorshadow) ;

//label
imagestring ($image, $buttonfont, $buttonlabelX, $buttonlabelY,
$buttonlabel, $colorhighlight) ;

//Bild ausgeben
header ("content-type: image/jpeg") ;
imagejpeg ($image);


?>
</pre>
</body>
</html>
cryzze
 
Posts: 4
Joined: 10. February 2009 22:23

Re: php fehlersuche

Postby Wiedmann » 22. February 2009 21:41

ich finde den fehler aber einfach nicht.

Steht doch in der Fehlermeldung?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: php fehlersuche

Postby Xardas der Dunkle » 22. February 2009 22:38

Code: Select all
<html>
<body>
<pre>
<?


Ähm? Dort befindet sich bereits dein nächstes Problem, binäres Bild im HTML-Gerüst? ...
Zudem gehört jeder der diese abstruse Kurzschreibweise und dann auch noch register_globals nutzt gehängt :p.
User avatar
Xardas der Dunkle
 
Posts: 482
Joined: 09. March 2008 19:40
Location: /var/www


Return to PHP

Who is online

Users browsing this forum: No registered users and 27 guests