Jump to content

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).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.