note 54738 added to function.parse-ini-file
| From: | christian at thebartels dot de | Date: | Thu, 14 Jul 2005 05:12:50 +0000 |
| Subject: | note 54738 added to function.parse-ini-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-91931@lists.php.net to get a copy of this message | ||
@phpcoder:
there is another small bug in your code. in readINIfile the line
if (substr($value, 1, 1) == '"' && substr($value, -1, 1) ==
'"') {$value = substr($value, 1, -1); }
should be
if (substr($value, 0, 1) == '"' && substr($value, -1, 1) ==
'"') {$value = substr($value, 1, -1); }
(note the 0 in the first substr statement)
otherwise if you read an ini file, save it and read again the items of the array will have "
around them.
----
Manual Page -- http://www.php.net/manual/en/function.parse-ini-file.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+54738
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54738&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+54738&report=yes
Search -- http://master.php.net/manage/user-notes.php