I-R-Fool Posted April 28, 2010 Share Posted April 28, 2010 Need some help, its giving me:The image "mylink/img.php" can not be shown, because it contains errors.php code: <?php mysql_connect('localhost', 'root', ''); mysql_select_db('chat'); $im = imagecreatefrompng('bg2.png'); $q = mysql_query('SELECT * FROM msg ORDER by id DESC LIMIT 0,10'); $x = 6; $y = 11; $color = imagecolorallocate($im, 0xFF, 0x00, 0x00); while($rows = mysql_fetch_array($q)) { imagestring($im, $x, $y, $rows['name'].': '.$rows['msg'], $color); $y = $y + 10; } header('Content-type:image/png'); imagepng($im); ?> Link to comment Share on other sites More sharing options...
justsomeguy Posted April 28, 2010 Share Posted April 28, 2010 Comment out the content type header and see if you're getting an error. Link to comment Share on other sites More sharing options...
I-R-Fool Posted April 28, 2010 Author Share Posted April 28, 2010 Fixed, was missing a parameter. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.