philip Tue Nov 19 03:50:05 2002 EDT
Modified files:
/phpdoc/en/reference/filesystem/functions parse-ini-file.xml
Log:
ini values are evaluated for constants. Closes bug #19608
Index: phpdoc/en/reference/filesystem/functions/parse-ini-file.xml
diff -u phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.6
phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.7
--- phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.6 Wed Jun 5
03:15:48 2002
+++ phpdoc/en/reference/filesystem/functions/parse-ini-file.xml Tue Nov 19 03:50:05
+2002
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.87 -->
<refentry id="function.parse-ini-file">
<refnamediv>
@@ -53,8 +53,14 @@
</para>
</warning>
<para>
+ <link linkend="language.constants">Constants</link> may also be parsed
+ in the ini file so if you define a constant as an ini value before
+ running <function>parse_ini_file</function>, it will be integrated into
+ the results. Only ini values are evaluated. For example:
+ </para>
+ <para>
<example>
- <title>Contents of sample.ini</title>
+ <title>Contents of <filename>sample.ini</filename></title>
<programlisting>
<![CDATA[
; This is a sample configuration file
@@ -63,6 +69,7 @@
[first_section]
one = 1
five = 5
+animal = BIRD
[second_section]
path = /usr/local/bin
@@ -78,6 +85,8 @@
<![CDATA[
<?php
+define ('BIRD', 'Dodo bird');
+
// Parse without sections
$ini_array = parse_ini_file("sample.ini");
print_r($ini_array);
@@ -100,6 +109,7 @@
(
[one] => 1
[five] => 5
+ [animal] => Dodo bird
[path] => /usr/local/bin
[URL] => http://www.example.com/~username
)
@@ -109,6 +119,7 @@
(
[one] => 1
[five] => 5
+ [animal] = Dodo bird
)
[second_section] => Array
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php