Hello, >From my research on the manual page (http://www.php.net/manual/en/function.imagegif.php) if you give a 2nd argument to Imagegif() it writes the image to disk rather than sending it to the browser. Your browser is giving you that error message because the image data goes into the file and the browser gets an empty image.
regards, Peter --- Vinod Rao <[EMAIL PROTECTED]> wrote: > Hi , > I'm developing php script to generate an image having text written on it. > And I have to save that image to one file file.gif , so that I can use that > image in the next html file. > The extract of the code is where error comes : > > header("Content-type: image/gif"); > $filename = "./vinod/file.gif"; > $fh = fopen($filename,"w"); > fclose($fh); > chmod($filename, 0777); // octal; correct value of mode > Imagegif($myImage,$filename); > > It gives error message on the browser : > The image "http://192.168.1.18/cool1.php" cannot be displayed, because it > contains errors. > when I removed 2nd argument of Imagegif , then no error comes. > Kindly resolve the problem. > > Regards, > Vinod. > ____________________________________ > Vinod Rao > Member of Technical Staff > Terrawiz Software Technologies Pvt. Ltd. > Bangalore > URL :: http://www.terrawiz.com > Mobile : +91-9886741620 > ____________________________________________________ On Yahoo!7 Dating: It's free to join and check out our great singles! http://www.yahoo7.com.au/personals ____________________________________________________ On Yahoo!7 Dating: It's free to join and check out our great singles! http://www.yahoo7.com.au/personals