Re: Re: Newbie Q

From: Date: Thu, 17 Jul 2003 22:03:27 +0000
Subject: Re: Re: Newbie Q
References: 1 2 3 4 5 6  Groups: php.windows 
Request: Send a blank email to php-windows+get-20823@lists.php.net to get a copy of this message
Hey man, I tried using PHP_SELF and PATH_INFO, but they both got this error message: Notice: Use of undefined constant PHP_INFO - assumed 'PHP_INFO' in C:\Fedde\Share\Bilder- Resa\Tyskland-Alemania\Tisdag-Martes\Index.php on line 46 I found path_info when using phpinfo(), but not php_info. What am I doing wrong? /Gabbah "H Marc Bower" <hmbower@cogeco.ca> skrev i meddelandet news:000e01c34ba1$3b4596a0$0b01a8c0@canetix... > 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 (#20823) next »