Re: climb up the path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Dempster wrote:
> Personally I use.
>
> <?php require_once(dirname(dirname(__FILE__)).'/config.php');
>
> I think it's what most people do.

A... very interesting, thanks.

To get the path only I did this -

$path         = dirname(__FILE__);
$parts        = explode(DIRECTORY_SEPARATOR, $path);

array_pop($parts);

$INSTALL_PATH = implode(DIRECTORY_SEPARATOR, $parts);

It's kind of long...

If somebody has a better idea, I would be glad to hear.

Iv

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux