Ask a Question related to PHP Development, Design and Development.
-
Nurchi BECHED #1
I am new to php, PLESAE HELP!
Hello to everyone
I was trying to do the following in one of the php pages:
<img src="image.php?image=s01.jpg">
What should I put in "image.php" file?
I currently have:
<?php
$imageurl=$_GET["image"];
echo $imageurl;
?>
If I just do "http://localhost/php/image.php?image=s01.jpg"
It works just fine (i mean it shows the filename I provide through "image")
I am running IIS on Windows XP Pro
Thanks.
Nurchi BECHED Guest
-
Gary Tsui #2
Re: I am new to php, PLESAE HELP!
maybe...this might help:
<?php
$imageurl=$_GET["image"];
echo "<img src=\"$imageurl\">";
?>
an alternate version would be
<?
$imageurl=$_GET["image"];
?>
<img src="<? echo $imageurl ?>";
hope this helps
G
"Nurchi BECHED" <nurchi@telus.net> wrote in message
news:2XHfc.29481$dg7.11745@edtnps84..."image")> Hello to everyone
> I was trying to do the following in one of the php pages:
> <img src="image.php?image=s01.jpg">
>
> What should I put in "image.php" file?
> I currently have:
> <?php
> $imageurl=$_GET["image"];
> echo $imageurl;
> ?>
>
> If I just do "http://localhost/php/image.php?image=s01.jpg"
> It works just fine (i mean it shows the filename I provide through> I am running IIS on Windows XP Pro
>
> Thanks.
>
>
Gary Tsui Guest
-
Kevin Torr #3
Re: I am new to php, PLESAE HELP!
"Nurchi BECHED" <nurchi@telus.net> wrote in message
news:2XHfc.29481$dg7.11745@edtnps84..."image")> Hello to everyone
> I was trying to do the following in one of the php pages:
> <img src="image.php?image=s01.jpg">
>
> What should I put in "image.php" file?
> I currently have:
> <?php
> $imageurl=$_GET["image"];
> echo $imageurl;
> ?>
>
> If I just do "http://localhost/php/image.php?image=s01.jpg"
> It works just fine (i mean it shows the filename I provide through
What exactly are you trying to do? You're not very clear in the question.
Are you trying to display the image?
if so, try:
<?
header('Content-type: image/jpeg);
include($_GET['image']);
?>
Kevin Torr Guest
-
Nurchi BECHED #4
Re: I am new to php, PLESAE HELP!
Hello, Kevin!
You wrote on Fri, 16 Apr 2004 22:14:48 +1000:
KT> What exactly are you trying to do? You're not very clear in the
KT> question.
KT> Are you trying to display the image?
KT> if so, try:
....
KT> <?
KT> header('Content-type: image/jpeg);
KT> include($_GET['image']);
KT> ?>
Thanks, this helped, except for I had to use 'readfile' instead of
'include'.
Now it works.
Thanks again.
With best regards, Nurchi BECHED.
P.S.
C makes it easy to shoot yourself in the foot;
C++ makes it harder, but when you do,
it blows away your whole leg."
--Bjarne Stroustrup
Nurchi BECHED Guest
-
Smifffy #5
Re: I am new to php, PLESAE HELP!
<?php
$dir = './images/'; //path to images
location( $dir.$_GET['image'] );
?>
Nurchi BECHED wrote:
> Hello to everyone
> I was trying to do the following in one of the php pages:
> <img src="image.php?image=s01.jpg">
>
> What should I put in "image.php" file?
> I currently have:
> <?php
> $imageurl=$_GET["image"];
> echo $imageurl;
> ?>
>
> If I just do "http://localhost/php/image.php?image=s01.jpg"
> It works just fine (i mean it shows the filename I provide through "image")
> I am running IIS on Windows XP Pro
>
> Thanks.
>
>Smifffy Guest



Reply With Quote

