•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,528 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 394 | Replies: 1
![]() |
•
•
Join Date: Sep 2006
Posts: 12
Reputation:
Rep Power: 3
Solved Threads: 0
My server supported as " GD support : enabled" (linux OS using)
but this program not displayed the graph.
displayed the message "The image “http://xxx.xxx.xxx.xxx/test3.php” cannot be displayed, because it contains errors.
<?php
header("Content-type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
What is the problem with the code?
thanks in advance
Give me suggestion!
but this program not displayed the graph.
displayed the message "The image “http://xxx.xxx.xxx.xxx/test3.php” cannot be displayed, because it contains errors.
<?php
header("Content-type: image/png");
$im = @imagecreate(110, 20)
or die("Cannot Initialize new GD image stream");
$background_color = imagecolorallocate($im, 0, 0, 0);
$text_color = imagecolorallocate($im, 233, 14, 91);
imagestring($im, 1, 5, 5, "A Simple Text String", $text_color);
imagepng($im);
imagedestroy($im);
?>
What is the problem with the code?
thanks in advance
Give me suggestion!
Last edited by fernandodonster : Oct 19th, 2007 at 3:55 am. Reason: currection
When you see this error, take out the content-type declaration, You're probably getting an error from PHP, but because of content-type the browser is preventing you from seeing what is wrong.
// header("Content-type: image/png"); <-- comment out.
When you get a bunch of text with PNG on the front, you can put it back in.
// header("Content-type: image/png"); <-- comment out.
When you get a bunch of text with PNG on the front, you can put it back in.
Need a simple, powerful knowledgebase? Bigattichouse Knowledge Base finds the solution while you're still typing the problem.
http://www.bigattichouse.com/knowledgebase.html
http://www.bigattichouse.com/knowledgebase.html
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the PHP Forum
- Previous Thread: Dynamic Forms
- Next Thread: dynamic dropdown selection


Linear Mode