Re: Parse ini file problem

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

 



Thodoris wrote:
I am trying to parse an ini conf file using parse_ini_file but fails without returning something. I found this which is probably the reason:

http://bugs.php.net/bug.php?id=44544

(the $ in the values)

The problem is that this file has more than 7500 lines so it's kind of difficult to use quotes in all fields and there are several other reasons that I want to avoid quoting the values. In addition to that PHP 5.3 (which fixes this) is not stable yet and thus I can't install it in a production machine.

So does anybody know any workarounds??


well, looks that the 3rd argument has always been a part of parse_ini_string()

So, you could do this...

$ini_data = parse_ini_string(file_get_contents($filename), FALSE, INI_SCANNER_RAW);

I think this will work for you.

Jim Lucas

--
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