Re: Re: Newbie Q

From: Date: Wed, 16 Jul 2003 13:50:34 +0000
Subject: Re: Re: Newbie Q
References: 1 2 3 4 5  Groups: php.windows 
Request: Send a blank email to php-windows+get-20807@lists.php.net to get a copy of this message
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" <gabriel_k@bredband.net> To: <php-windows@lists.php.net> 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" <hmbower@cogeco.ca> skrev i meddelandet > news:002301c34b8e$51ca2f70$0a01a8c0@Zabadoo... > > 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" <gabriel_k@bredband.net> > > > What if there is no file? > > > "Heyz" <heyzinsh@hotmail.com> 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 > >

« previous php.windows (#20807) next »