|
Posted by b007uk on 05/15/06 16:37
Hi!
Really need help, dont know whats wrong :(
I am trying to show images using php script, it works fine, pictures
are shown,
but if i right click on it and choose "save picture as" it offers me to
save it as "untitled.bmp",
not jpeg the picture actually is :(
And if i do save it and then check it - it is actually bmp image, not
jpeg (it has bmp header)
Could you help please, i need to be able to save it as jpeg, using
"save picture as".
here is the script:
<?php
if ($_REQUEST['img'])
{
$showfile = $_REQUEST['img'];
if (file_exists($showfile))
{
header("content-type: image/jpeg");
header('Content-Length: ' . filesize($showfile));
$mfile = fopen($showfile, 'rb');
fpassthru($mfile);
fclose($mfile);
}
}
echo "<img src='?img=1.jpg'>";
?>
Thanks a lot!
[Back to original message]
|