note 16292 rejected from function.getcwd by zak
| From: | zak@php.net | Date: | Tue, 23 Oct 2001 23:40:11 +0000 |
| Subject: | note 16292 rejected from function.getcwd by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19350@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...