Re: Is it Possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sagar C Nannapaneni wrote:
I'm calling a php script with <img> tag

for ex: <img src="http://localhost/test.php?img=asfd";>

and the test.php is as follows...

test.php
------------
<?
....
....
some server side validations
....
readfile("abcd.gif");
?>
-----------------------------------------------

Theres no problem with this..its working fine. But i want to return some text(or Html) the
browser along with the image. So is there anyway that i can send the text to the browser

You seem to have a pretty good understanding of what's going on already. What you can do is have one script (main.php) that includes the <img> tag that links to the PHP generated gif (test.php). Then you can put whatever text / html you want in main.php

<?php

/** main.php */

echo "<p>I am a super cool piece of text.  Now check out this
picture!</p>\n<img src=\"http://localhost/test.php?img=asdf\";>";

?>

in this fashion. Even anyother solution other than the <img> is also Ok. Showing img
is not a priority for me but sending the text is..

Any help will be greatly appreciated..

Thanks,
/sagar


--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux