NYCPHP Meetup

NYPHP.org

[nycphp-talk] parse_ini_file() wants full path... ?

David Mintz dmintz at davidmintz.org
Fri Feb 27 15:14:00 EST 2004


I'll give that a shot. In the meantime I just got bored with the struggle
and decided to require('./config.php') instead and let config.php do the
configuring. TMTOWTDI!

Thanks (-:

On Fri, 27 Feb 2004, Eric Rank wrote:

> A work around might be to use the realpath() function.
>
> $path = realpath('./file.ini');
> parse_ini_file($path);
>
> cheers!
>
> Eric
>
> > On my development machine -- RH Linux 9/Apache 1.3.27/PHP 4.3.3 -- I get a
> > 'cannot open file.ini for reading' error from parse_ini_file unless I give
> > it the full path.  I want to be able to say parse_ini_file('./file.ini')
> > for the convenience of inter-server portability. (The caller and the ini
> > file do live in the same directory.)
[snip]
---
David Mintz
http://davidmintz.org/

        "Anybody else got a problem with Webistics?" -- Sopranos 24:17



More information about the talk mailing list