12-26-2008, 10:48 AM
|
#1 (permalink)
|
|
The Contributor
Join Date: Sep 2008
Location: Miami
Posts: 39
Thanks: 7
|
ARRGH! GD!!!!!!!!! help..
PHP Code:
class image
{
public function text($variable)
{
$image = imagecreate(200,25);
imagecolorallocate($image, 255, 255, 255);
$fontColor = imagecolorallocate($image, 0, 0, 0);
$startX = 15;
$startY = 5;
$string = "$variable";
imagestring($image, 3, $startX, $startY, $string, $fontColor);
header("Content-type: image/jpeg");
imagejpeg($image);
imagedestroy($image);
}
}
$image = new image();
When ever I do
PHP Code:
<?=$image->text('user@email.com');?>
I get
PHP Code:
Warning: Cannot modify header information - headers already sent by (output started at C:\DIR:3) in C:\class.php on line 65
�JFIF�������>CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), default quality �C� $.' ",#(7),01444'9=82<.342�C 2!!22222222222222222222222222222222222222222222222222���"������������ ����}�!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������� ���w�!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���?�(+G;p}3z隱^?ĺ]bmxi$M6nڨY?WcdnX;}v_J^9Ѽ|Q9-)) @Eq _z^wl\eո]P9*ԞNTN+ ( ( ( ( ( ( ( ( ( ( n*巸9 I]H#TP h*$YΖ$§+ ';W+r(�(�(�(�(�(�(�(�(�(�(�(
|
|
|