Well, if you want the path as far as the website is concerned, use dirname($PHP_SELF). If you want the absolute file system path, use getcwd().
Example: Files located on server at D:\wwwroot\files\uploads\here By website address at: http://yourserver.com/files/uploads/here File being accessed: http://yourserver.com/files/uploads/here/file.php <?php $title = dirname($PHP_SELF); ?> This will set $title to /files/uploads/here <?php $title = getcwd(); ?> This will set $title to D:\wwwroot\files\uploads\here Depends on what value you actually want to use. (V) ----- Original Message ----- From: "Gabriel_k" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 16, 2003 8:18 AM Subject: Re: [PHP-WIN] Re: Newbie Q > Well, I want my php script to put the TITLE of a html page to the name of > the directory the script is in. > > /Gabbah > > "H Marc Bower" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] > > Um... the file in which you put that command should be there... :) > > > > What is the purpose for knowing the directory name? Maybe there is > > something else you can tell us that will get you the answer you're looking > > for. > > > > (V) > > > > ----- Original Message ----- > > From: "Gabriel_k" <[EMAIL PROTECTED]> > > > What if there is no file? > > > "Heyz" <[EMAIL PROTECTED]> skrev i meddelandet > > > > It's simple. > > > > > > > > dirname(__FILE__) > > > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php