Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_php thread: image in php


Message #1 by "Pepa Nacheva" <HSNS@r...> on Tue, 17 Apr 2001 22:34:37 -0700
Please, send me a small example which works
with php about creating image! Even this one
doesn't work on my OmniHttpd local Server
with PHP4:
<?php
Header ("Content-Type:image/gif");
$im = ImageCreate(100,100);
$black = ImageColorAllocate(im, 0, 0, 0);
$white = ImageColorAllocate(im, 255, 255, 255);
ImageLine($im, 0, 0, 99, 99, $white);
ImageGif($im);
?>
It shows:
====
Warning: Cannot add header information - headers already sent by (output started at 
C:\HTTPD\HTDOCS\Code\Chapter 15\mytest1.php:2) in C:\HTTPD\HTDOCS\Code\Chapter 
15\mytest1.php on line 3

Fatal error: Call to undefined function: imagecreate() in C:\HTTPD\HTDOCS\Code\Chapter 
15\mytest1.php on line 4
====
Thank you in advance!
I am very very sad...
Pepa, from Bulgaria

**********************************************
Pepa Nacheva, nacheva@m...

  Return to Index