Re: Finding out the local path to a file.

From: Date: Tue, 24 Feb 2004 00:33:06 +0000
Subject: Re: Finding out the local path to a file.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-178618@lists.php.net to get a copy of this message
On Monday 23 February 2004 04:31 pm, Simon Fredriksson wrote: > I'm wondering if there's a way for PHP fo know the local path of > REQUEST_URI. I've used a script to list directories, in order to replace > the looks of the traditional Indexes look (apache). By setting > DirectoryIndex to a fixed file (/list/lister.php) that file is now > executed whenever there's no other indexfile in the folder. But how can > I let it know which folder to work in? Let's say that it gets > example.com/~simon/files/ as URL. All the local variables I've seen by > using phpinfo() point to the location of the file, not the folder I'm > requesting. > > Any ideas? dirname($_SERVER['SCRIPT_FILENAME'])? > > //Simon -- Evan Nemerson evan@coeus-group.com http://coeusgroup.com/en

« previous php.general (#178618) next »