background color imagefill


Posted on 16th Feb 2014 07:03 pm by admin

Hello

I would like to ask you why I see this square in red color just in my local xampp installation. If I run the code in the remote server (http://www.arreglaordenador.com/numberimage2.php) I see the square in black color instead of red. Do you have any ideas?

Code: (text)
<?php

$im = imagecreatetruecolor(100, 100);

// sets background to red
$red = imagecolorallocate($im, 255, 0, 0);
imagefill($im, 0, 0, $red);

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

No comments posted yet

Your Answer:

Login to answer
65 Like 36 Dislike
Previous forums Next forums
Other forums

problem with query error
First Thanks to those who helped me on my previous posts, and the following code i'm using is not mi

IIS & NW MII on the same server
Hi,

We're weighing the possibility to run both IIS and MII (NetWeaver) on the same server

Hyperlink is adding an extra gap to variable
Hi, here's my problem..

I have a php generated page with a hyperlink which opens in a new win

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Stuck with preg_replace
Hi,

I'm trying to use preg_replace to remove part of the IP address submitted using a form on

parsing error
can anyone explain this syntax error:

Parse error: syntax error, unexpected T_IF

The e

How do I use a global footer..?
If my index.php has a bole bunch of if functions and exit's in them

PHP Mysql Staff Induction System
Hi there, I'm pretty new to PHP and Mysql so could really do with being pointed in the right directi

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

cURL error
So here is my code... I got it off of here... http://www.youtube.com/watch?v=XcgQUsorF_8
Because

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash