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

extending tidy
I have problem with type-hinting and extending tidy. This code creates error:
Code: class cMyTidy

gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer a

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

array_map() probably obvious mistake
The code below is part of a class to escape strings, but should also accept an array, using array_ma

Generating unique numbers using php
Hi,
I need help in generating unique number using php.I tired using rand() in php.But, by using r

Price in PR
Dear Experts,
Why we have to enter the price in the PR, and why there is no free goods indicato

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

Change Web page language
i doing this thing first time but i dont find any suitable solution for it. On the demand of user. I

Web Host List
Here is a list of web hosts that offer PHP and MySQL. It is no where near a full list, but it is mos

records between 2 dates
Hello all,

I have a date tracked table which contains effective_start_date and effective

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