...

View Full Version : how to show image in brower with php



minkoko
08-05-2012, 05:07 AM
Hi Everybody ,
i want to make a show image when i run php file

so, how to write php file with image show in brower

i mean run this localhost/image.php

the image is show in browser

Thanks,

Len Whistler
08-05-2012, 06:43 AM
Untested

<?php

echo "<img src=\"images/photo.jpg\">";

?>

MarkR
08-06-2012, 10:53 AM
header('Content-type: image/jpg');
readfile($fullpathtoimg);



Make sure you adjust the header content type depending on the image type.

minkoko
08-09-2012, 03:23 AM
header('Content-type: image/jpg');
readfile($fullpathtoimg);



Make sure you adjust the header content type depending on the image type.
Right! i got it ,thanks for advice:thumbsup:



$fullpathtoimg = "eg.jpg";
header('Content-type: image/jpg');
readfile($fullpathtoimg);


thanks Len Whistler
i got two :thumbsup: method

Birlamedisoft
08-09-2012, 05:18 AM
[QUOTE=minkoko;1259163]Right! i got it ,thanks for advice:thumbsup:



$fullpathtoimg = "eg.jpg";
header('Content-type: image/jpg');
readfile($fullpathtoimg);




Thanks for the information. i was also searching for the same from many days.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum