Reply to Show image img src=img.php?img=1.jpg help

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация