Cannot modify header information - headers already sent by

Posted by bhaskaragr29 on Stack Overflow See other posts from Stack Overflow or by bhaskaragr29
Published on 2010-05-05T13:31:09Z Indexed on 2010/05/05 13:38 UTC
Read the original article Hit count: 334

Filed under:
|

header('Content-type: image/png'); require_once 'wordwrap.php'; $text="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum"; $im=imagecreatefrompng('testing.png'); $arr=word($text); $white = imagecolorallocate($im,255,255,255); $grey = imagecolorallocate($im, 128, 128, 128); $font='arial.ttf'; $m=121; for($i=0;$i

Word function is returning an array.I am writing array on image as multiple lines.I am getting error when when placed below imagepng function Warning: Cannot modify header information - headers already sent by (output started at /home2/puneetbh/public_html/prideapp/Testing/wordwrap.php:33) in /home2/puneetbh/public_html/prideapp/Testing/checkimage.php on line 12 ‰PNG ??? IHDR?? ??ô???J"Þ/?? ?IDATxœì¼KvÉŽ%ŠŸ}Ü)EfäjÕxÝËÇ›nE^)Èãn??Õ€J‘UÕ~ß --ŠKä>ƒÛàÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ7nܸqãÆ

When placd in starting i m getting this file cannot be displayed because it contains errors. PLease Help

© Stack Overflow or respective owner

Cannot modify header information - headers already sent by

Posted by bhaskaragr29 on Stack Overflow See other posts from Stack Overflow or by bhaskaragr29
Published on 2010-05-05T12:10:23Z Indexed on 2010/05/05 12:18 UTC
Read the original article Hit count: 334

Filed under:
|
<?php 

//require_once 'wordwrap.php';
//$text="Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum Lorem Ipsum";
$im=imagecreatefrompng('testing.png');
//$arr=word($text);
$white = imagecolorallocate($im,255,255,255);
$font='arial.ttf';
$m=121;
for($i=0;$i<sizeof($arr);$i++)
{
    imagettftext($im,25,11,124,'Hello world!', $white);

}
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>

I am getting error..please help me on this.

© Stack Overflow or respective owner

Related posts about php

Related posts about gd