mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Fixed example being in wrong file
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@282485 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
6676521c23
commit
5864c5a8ad
2 changed files with 37 additions and 41 deletions
|
@ -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>
|
||||
|
@ -222,6 +222,41 @@ Array
|
|||
)
|
||||
|
||||
)
|
||||
]]>
|
||||
</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue