RE: [PHP-WIN] *.ini

From: Date: Wed, 16 May 2001 01:13:52 +0000
Subject: RE: [PHP-WIN] *.ini
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-7592@lists.php.net to get a copy of this message
Actually, it does work under Windows... It's how you've passed the path to it that's the problem. Try t:/cd/test.ini instead of t:\cd\test.ini. If you insist on using the latter form, you need to escape the \ as \\ so it reads t:\\cd\\test.ini Ignatius -----Original Message----- From: John Taylor-Johnston [mailto:taylorjo@CollegeSherbrooke.qc.ca] Sent: Wednesday, 16 May 2001 10:58 To: php-windows@lists.php.net Subject: Re: [PHP-WIN] *.ini 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. -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net For additional commands, e-mail: php-windows-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.windows (#7592) next »