Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001041

RE: [PHP-DB] headers From: Corin Rathbone (corinrathbone <email protected>)
Date: 04/07/01

You need to put the headers before any output has been sent to the user, not
line on line 6, line 2 if possible. This includes spaces or blank lines
before the start of your php.
e.g. Here is script that creates a simple image:
<?php
header ("Content-type: image/png");
$im =  <email protected> (200, 200) or die ("Cannot Initialize new GD image
stream");
$background_color = ImageColorAllocate ($im, 00, 00, 00);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 90, 20, 20, "Hello", $text_color);
ImagePng ($im);
?>

Regards,
Corin Rathbone
Webmaster <email protected>

P.S. If you use the script you need the GD Image librays installed and
enabled.

-----Original Message-----
From: Sharmad Naik [mailto:sharmad <email protected>]
Sent: 07 April 2001 08:16
To: php-db <email protected>
Subject: [PHP-DB] headers

When ever i add headers in my pages i get the following errors
Can anybody tell me what's wrong?

Warning: Cannot add header information - headers already sent by (output
started
 at /usr/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php:4) in
/usr
/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php on line 6

-Sharmad

--
The secret of the universe is @*&í!'ñ^#+ NO CARRIER
__    _  _      _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>