Re: *.ini

From: Date: Wed, 16 May 2001 00:57:35 +0000
Subject: Re: *.ini
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-7590@lists.php.net to get a copy of this message
Hi and thanks, but it won't work on Windows. here is a copy of the problem I sent to its author. If anyone can help or has another class I can try, I would appreciate it. John ----------------------------------------------------------------------------------------- I think I have found a bug with cIniFileReader.inc (Fresh download today from: http://phpclasses.upperdesign.com/browse.html/package/204 ) I'm using PHP 4.0.5 [738Kb] - 30 April 2001 Located at: http://php.net/downloads.php Does your cIniFileReader.inc class function with Windows? Do you have a Windows version? Does cIniFileReader.inc presently support Windows? I have used your testinifilereader.php3 but it will not read my test.ini, file located in t:\cd\test.ini Borrowing your syntax, I echoed this to be sure: echo $DOCUMENT_ROOT."/test.ini"; And it reads back: T:\\cd/test.ini There is definitely a mix of Unix and Windows syntax here? None of these appear to work: - Test find the value for a given key and section - Test find all keys for a given section - Test find all sections in the ini file But when I do this: Test add a key/value pair to the given section It does write a section, key and a value in my T:\cd\test.ini, but it also gives this error: Warning: Undefined variable: OS in T:\cd\library\classes\cIniFileReader.inc on line 161 I assume it is weirding out on this: if (substr($OS, 0, 3) == "Win") { // windows environment $newline = "\r\n"; } else { // other environment. assume *nix $newline = "\n"; } I can tell you it is definitely writing just \n and not \r\n to the test.ini, therefore defaulting to the else string. What is the $OS variable? Thanks, John > Have a look @ > http://phpclasses.upperdesign.com/browse.html/package/204 > U have 2 register, but it's 4 free. Very usefull site.

« previous php.windows (#7590) next »