Re: How to find path for PHP script
| From: | John W. Holmes | Date: | Mon, 10 May 2004 19:02:19 +0000 |
| Subject: | Re: How to find path for PHP script | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185833@lists.php.net to get a copy of this message | ||
From: "Daniel Clark" <dclark@nwlink.com>
> > Does anyone know a quick way to find the full path on a shared hosting
> > plan to use in an include file?
>
> What about:
>
> $_SERER['PATH_TRANSLATED']
If you note my message from yesterday, I was having some trouble with this
variable on certain configurations. You may want to use
$_SERVER['SCRIPT_FILENAME'] which will have the same value and seems to be
present in more cases (or just test for both).
---John Holmes...