Re: Outputting multiple images
| From: | Ernest E Vogelsinger | Date: | Thu, 07 Nov 2002 16:10:24 +0000 |
| Subject: | Re: Outputting multiple images | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-123181@lists.php.net to get a copy of this message | ||
At 16:57 07.11.2002, ed@home.homes2see.com spoke out and said:
--------------------[snip]--------------------
> I think the random number query will work but I have a problem with the
>context of the echo line.
>
>Here's how I get the image path.
>
><?
>$root_path = "/www/special_projects/Elkhart";
>$agent_url = "$root_path/$agent_name";
>?>
>
><img src="<? echo $agent_url; ?>">
>
>How would I use the rand function in the above statement?
--------------------[snip]--------------------
1) I believe the root path you gave is the server's file path, not the URL
it should point to... well, it just looks like this.
2) code your template like this:
<img src="<?php echo "$root_path/$agent_name?r=",
random();?>">
This will result in something like
<img src="/www/special_projects/Elkhart/your.agent.jpg?r=17382">
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/