note 16292 added to function.getcwd
| From: | sazon666 at mail dot ru | Date: | Tue, 23 Oct 2001 21:09:27 +0000 |
| Subject: | note 16292 added to function.getcwd | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-19345@lists.php.net to get a copy of this message | ||
Sorry, mabye I'm dumb at all, but maybe anybody can help:
I include some files from index.php, which are located in different folders. getcwd() gives me the
path to the current working directory, not the folder where the included file is. How can I know
what folder the included file is in, not setting a variable with the chdir's argument before
including the file, or doing something like that? I don't think it looks pretty.
P. S. I read somewhere, that there sould be the __FILE__ constant, but print(__FILE__) does nothing,
defined(__FILE__) returns false...
--
http://www.php.net/manual/en/function.getcwd.php
http://master.php.net/manage/user-notes.php?action=edit+16292
http://master.php.net/manage/user-notes.php?action=delete+16292
http://master.php.net/manage/user-notes.php?action=reject+16292