Re: Can Anyone translate my script to php?
| From: | Michael Kimsal | Date: | Sun, 10 Mar 2002 18:34:33 +0000 |
| Subject: | Re: Can Anyone translate my script to php? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87922@lists.php.net to get a copy of this message | ||
Ceyhun GüLer wrote:
I have a small picture and when I click on this image image opens resimgoster.asp with "resimgoster.asp?res=main tumbled images picture.jpg" and this asp code includes <%@language="vbscript"%> <%location=request.querystring("res") location=replace(location, " ", "/") %> <body> <img src="<%=location%>"> </body> this code gets "res" variable and replace " " fields with "/" by this way I use only one file to enlarge of these picture... but I need it in php now can any one translate my asp code to php code?I'd probably do something like <? $l = str_replace(" ","/",$res); ?> <body> <img src="<?=$l;?>"> </body> I'm relying on the fact that $res would be autodefined as a variable from the querystring. This behaviour is not standard in the latest version of PHP I believe, but most versions before have it come by default. The server admin may have disabled it, but by default that happens. If it's not on, you could add a line to make it: <? $res = $HTTP_GET_VARS["res"]; $l = str_replace(" ","/",$res); ?> <body> <img src="<?=$l;?>"> </body> --------------------------- Michael Kimsal http://www.phphelpdesk.com/ Taking the ? out of <?php 734-480-9961