cvs: phpdoc /en/reference/filesystem/functions parse-ini-file.xml parse-ini-string.xml

From: Date: Wed, 13 May 2009 08:12:43 +0000
Subject: cvs: phpdoc /en/reference/filesystem/functions parse-ini-file.xml parse-ini-string.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4010@lists.php.net to get a copy of this message
kalle Wed May 13 08:12:43 2009 UTC Modified files: /phpdoc/en/reference/filesystem/functions parse-ini-file.xml parse-ini-string.xml Log: New example for parse_ini_string(), plus add ^ as one of the special characters in INI files http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/parse-ini-file.xml?r1=1.35&r2=1.36&diff_format=u Index: phpdoc/en/reference/filesystem/functions/parse-ini-file.xml diff -u phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.35 phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.36 --- phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.35 Tue Apr 21 03:11:56 2009 +++ phpdoc/en/reference/filesystem/functions/parse-ini-file.xml Wed May 13 08:12:43 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.35 $ --> +<!-- $Revision: 1.36 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-file"> <refnamediv> <refname>parse_ini_file</refname> @@ -249,7 +249,7 @@ There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, no and false results in "", yes and true results in "1". - Characters <literal>{}|&amp;~![()"</literal> must not be used anywhere in + Characters <literal>{}|&amp;~![()^"</literal> must not be used anywhere in the key and have a special meaning in the value. </simpara> </note> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/parse-ini-string.xml?r1=1.2&r2=1.3&diff_format=u Index: phpdoc/en/reference/filesystem/functions/parse-ini-string.xml diff -u phpdoc/en/reference/filesystem/functions/parse-ini-string.xml:1.2 phpdoc/en/reference/filesystem/functions/parse-ini-string.xml:1.3 --- phpdoc/en/reference/filesystem/functions/parse-ini-string.xml:1.2 Mon Apr 27 15:15:25 2009 +++ phpdoc/en/reference/filesystem/functions/parse-ini-string.xml Wed May 13 08:12:43 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-string"> <refnamediv> <refname>parse_ini_string</refname> @@ -68,6 +68,45 @@ </para> </refsect1> + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>parse_ini_file</function> parsing a php.ini file</title> + <programlisting role="php"> +<![CDATA[ +<?php +// A simple function used for comparing the results below +function yesno($expression) +{ + return($expression ? 'Yes' : 'No'); +} + +// Get the path to php.ini using the php_ini_loaded_file() +// function available as of PHP 5.2.4 +$ini_path = php_ini_loaded_file(); + +// Parse php.ini +$ini = parse_ini_file($ini_path); + +// Print and compare the values, note that using get_cfg_var() +// will give the same results for parsed and loaded here +echo '(parsed) magic_quotes_gpc = ' . yesno($ini['magic_quotes_gpc']) . PHP_EOL; +echo '(loaded) magic_quotes_gpc = ' . yesno(get_cfg_var('magic_quotes_gpc')) . PHP_EOL; +?> +]]> + </programlisting> + &example.outputs.similar; + <screen> +<![CDATA[ +(parsed) magic_quotes_gpc = Yes +(loaded) magic_quotes_gpc = Yes +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="notes"> &reftitle.notes; <note> @@ -75,7 +114,7 @@ There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, no and false results in "", yes and true results in "1". - Characters <literal>{}|&amp;~![()"</literal> must not be used anywhere in + Characters <literal>{}|&amp;~![]()^"</literal> must not be used anywhere in the key and have a special meaning in the value. </simpara> </note>

« previous php.doc.cvs (#4010) next »