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?

Did you know?Explore Trending and Topic pages for more stories like this.
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

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

Dynamically allocating the number of rows in a table based on a variable value
Hi,
I have situation here which i cannot resolve, I have a variable temp which stores the num

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

Preloading images
Posting this question here because I am not sure where this should belong.I am building an asp.net a

Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.

error with opendir
when i do this

if ($handle = opendir($dir)) {
while (false !== ($file = readdir($han

How to limit the calls to an API
Hello, in my simple script I call an api which effectively involves me getting an xml file.

H

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

duplicate record notification
In my database, after insertion of records, I want to know if the record inserted is duplicate or no

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