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



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to