Re: relative filename /home/www... in stead of /www/.....
| From: | Ralph Deffke | Date: | Sun, 26 Aug 2001 15:45:32 +0000 |
| Subject: | Re: relative filename /home/www... in stead of /www/..... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64509@lists.php.net to get a copy of this message | ||
use $SCRIPT_FILENAME and extract the parts of the path as u need.
or better $PATH_TRANSLATED see also php manual chapter 7 predefined variables.
Chris Hayes schrieb:
> dear group,
>
> I use the $DOCUMENT_ROOT to make a complete file name.
>
> $fpname=$DOCUMENT_ROOT.'/includes/blocks/dynmenu.php';
>
> It does not work on one site: the document root misses the /home/ start. I could
> just hardcode this but i'ld rather have a function that would work everywhere.
>
> What can i do?
>
> Warning: fopen("/www/ecodorp/admin/modules/dynmenu.src","r")
> - No such file or directory in /home/www/ecodorp/php/post/admin/modules/dynmenu.php on line
> 378
> I cannot open /www/ecodorp/admin/modules/dynmenu.src
> Chris
>
> --------------------------------------------------------------------
> -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands --
> --------------------------------------------------------------------
>
>