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

count only commas outside parenteses
I have a sql table containing
id - query - query name
the first page contains a drop down men

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai

Had a simple form script that suddenly stopped working
It was made about a year ago and had been working fine. Last time it was known to work for sure was

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

login page does not execute a else statement
I've created a login page using sessions.
When an incorrect user name or password is entered then

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

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