"Dennis Biletsky" <ufafa@ua.fm> сообщил/сообщила в новостях следующее:
news:c7stgs$2t4f$1@fortress.intercom.net.ua...[color=blue]
>
> "Rithish" <rithish@dacafe.com> ???????/???????? ? ???????? ?????????:
> news:fdacfdda.0405120153.73c0edab@posting.google.c om...[color=green]
> > I have a set of images on a server. I want to pick these from the
> > database without creating a
> >
> > temporary file on the server; and also have some text alongwith it.
> >
> > Something like,
> >
> > ImageViewer.php
> > <?
> >
> > print ( "<IMG SRC='GetImage.php?strImageId=1'>" );
> > print ( " some description about the image... " );
> >
> > print ( "<IMG SRC='GetImage.php?strImageId=2'>" );
> > print ( " some description about the image... " );
> >
> > ...
> > ...
> >
> > ?>
> >
> > GetImage.php would server me with the image data from the database,
> > probably something like
> >
> > this.
> > <?
> >
> > ... Create database connection ...
> > ... Get image data from database depending on strImageId ...
> >
> > header ( "Content-Type: Image/gif" );
> > print ( $image_data );
> >
> > ?>
> >
> > GetImage.php gives the image alright.. ( I called
> >
http://my_server.com/GetImage.php?strImageId=1
> >
> > ). However, what I want is a combination of both html and text.
> >
> > Is it possible to acheive what I am trying to??
> >
> > Any help would be greatly appreciated.
> >
> > Regards,
> > Rithish.[/color]
>
> Try exclude you HTML tags from php-script like this
> ImageViewer.php
> <?php
> ......
> ?>
> <IMG SRC='GetImage.php?strImageId=1'>
> <SPAN> some description about the image... </span>
>
> <IMG SRC='GetImage.php?strImageId=2'>
> <SPAN> some description about the image... </SPAN>
> <?php
> ...
> ...
>
> ?>
>
>[/color]
By the way I have checked your variant and it works too. So if your script
doesn't work it happens due to another reason.