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

From: Date: Sun, 21 Jun 2009 01:58:48 +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-4176@lists.php.net to get a copy of this message
kalle Sun Jun 21 01:58:48 2009 UTC Modified files: /phpdoc/en/reference/filesystem/functions parse-ini-file.xml parse-ini-string.xml Log: Fixed example being in wrong file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/parse-ini-file.xml?r1=1.36&r2=1.37&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.36 phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.37 --- phpdoc/en/reference/filesystem/functions/parse-ini-file.xml:1.36 Wed May 13 08:12:43 2009 +++ phpdoc/en/reference/filesystem/functions/parse-ini-file.xml Sun Jun 21 01:58:48 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.36 $ --> +<!-- $Revision: 1.37 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-file"> <refnamediv> <refname>parse_ini_file</refname> @@ -226,6 +226,41 @@ </screen> </example> </para> + <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"> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/filesystem/functions/parse-ini-string.xml?r1=1.4&r2=1.5&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.4 phpdoc/en/reference/filesystem/functions/parse-ini-string.xml:1.5 --- phpdoc/en/reference/filesystem/functions/parse-ini-string.xml:1.4 Wed May 13 08:14:03 2009 +++ phpdoc/en/reference/filesystem/functions/parse-ini-string.xml Sun Jun 21 01:58:48 2009 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.parse-ini-string"> <refnamediv> <refname>parse_ini_string</refname> @@ -68,45 +68,6 @@ </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>

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