hi, I don't know whether this will solve your problem, but the following prints the full path of the file that is being used.
<script language="php"> $uri = getenv('REQUEST_URI'); $path = $HTTP_SERVER_VARS["PATH_TRANSLATED"]; // This prints /~user/subapp/test.php echo "<br>$uri<br>"; // This prints /home/<servername>/<username>/public_html/subapp/test.php echo "<br>path : $path<br>"; </script> regards - JFK kishor Nilgiri Networks On Sat, 2 Mar 2002, Andy wrote: > Hi there, > > I am trying to find out which dir the user is browsing. How can I get the > URL into a var? I tryed path_info, but it only returns the filename. > > Here is an example: > > URL: http://www.server.com/subapp/test.php > > Should return : > > subapp > > Is this possible?? > > Thanx for any help > > Cheers Andy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php