php-windows | 2001051
Date: 05/15/01
- Next message: Chris Sano: "Re: [PHP-WIN] Can't get XML Parser Class to work"
- Previous message: Chris Sano: "[PHP-WIN] setting up .phps"
- Next in thread: jtjohnston: "Nope: [PHP-WIN] *.ini"
- Reply: jtjohnston: "Nope: [PHP-WIN] *.ini"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 <email protected>]
Sent: Wednesday, 16 May 2001 10:58
To: php-windows <email protected>
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 <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Sano: "Re: [PHP-WIN] Can't get XML Parser Class to work"
- Previous message: Chris Sano: "[PHP-WIN] setting up .phps"
- Next in thread: jtjohnston: "Nope: [PHP-WIN] *.ini"
- Reply: jtjohnston: "Nope: [PHP-WIN] *.ini"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

