images from database do not display in chrome [SOLVED]
Posted: Wed Jan 19, 2011 12:08 pm
Hi All,
I am making a site where a user can upload and display images. This is straightforward enough in PHP. In fact, this works very well in firefox. Problem is with Chrome. The image appears while the image display page is loading, but as soon as loading is done, the image error icon appears. Has anyone else experienced this with Chrome?
Ideas to try and fix this? Again, it works well in firefox. The display image code is below.
I am making a site where a user can upload and display images. This is straightforward enough in PHP. In fact, this works very well in firefox. Problem is with Chrome. The image appears while the image display page is loading, but as soon as loading is done, the image error icon appears. Has anyone else experienced this with Chrome?
Ideas to try and fix this? Again, it works well in firefox. The display image code is below.
Code: Select all
<?php
require_once('Comic.php');
if (isset($_REQUEST['id'])) {
$comic = Comic::GetById($_REQUEST['id']);
header("Content-length: {$comic->imageSize}");
header("Content-type: {$comic->imageType}");
echo $comic->image;
exit;
}