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.b mp",
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($s howfile))
{
header("content-type: image/jpeg");
header('Content-Length: ' . filesize($showf ile));
$mfile = fopen($showfile , 'rb');
fpassthru($mfil e);
fclose($mfile);
}
}
echo "<img src='?img=1.jpg '>";
?>
Thanks a lot!
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.b mp",
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($s howfile))
{
header("content-type: image/jpeg");
header('Content-Length: ' . filesize($showf ile));
$mfile = fopen($showfile , 'rb');
fpassthru($mfil e);
fclose($mfile);
}
}
echo "<img src='?img=1.jpg '>";
?>
Thanks a lot!
Comment