Jump to content

[SOLVED] Php Page in IMG SRC


vijayshekar

Recommended Posts

Hello,

 

I am trying to embed image from php page as follows:

 

my html page is as below

--------------------------------------

<html>

<head>

</head>

<body>

<a><img src="/images/image.php"></img></a>

</body>

</html>

 

The image.php page is as below

--------------------------------------------

<?php

header("Content-type: image/jpeg");

echo "<img src=\"logo.jpg\" border=\"0\" align=\"left\"></img>";

?>

 

When I open the html page I am getting broken image.

Kindly help me to display the image from the php page in my html page?

 

Thanks

Vijay

Link to comment
https://forums.phpfreaks.com/topic/138991-solved-php-page-in-img-src/
Share on other sites

oopz, tbh ignore me i am very tired

 

Eh we all have our times, but you were not far off.

 

readfile is what he was referring to, which might be a better solution, I am not sure.

 

PS Remember to marked as "Solved" (bottom left hand corner).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.