cvs: phpdoc-ja /reference/filesystem/functions parse-ini-file.xml
| From: | TAKAGI Masahiro | Date: | Mon, 29 Jun 2009 03:11:27 +0000 |
| Subject: | cvs: phpdoc-ja /reference/filesystem/functions parse-ini-file.xml | ||
| Groups: | php.doc.ja | ||
| Request: | Send a blank email to doc-ja+get-2485@lists.php.net to get a copy of this message | ||
takagi Mon Jun 29 03:11:27 2009 UTC
Modified files:
/phpdoc-ja/reference/filesystem/functions parse-ini-file.xml
Log:
sync with en.
http://cvs.php.net/viewvc.cgi/phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml?r1=1.20&r2=1.21&diff_format=u
Index: phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml
diff -u phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml:1.20
phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml:1.21
--- phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml:1.20 Sun May 24 06:08:30 2009
+++ phpdoc-ja/reference/filesystem/functions/parse-ini-file.xml Mon Jun 29 03:11:27 2009
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision: 1.20 $ -->
-<!-- EN-Revision: 1.36 Maintainer: hirokawa Status: ready -->
+<!-- $Revision: 1.21 $ -->
+<!-- EN-Revision: 1.37 Maintainer: hirokawa Status: ready -->
<!-- CREDITS: shimooka -->
<refentry xmlns="http://docbook.org/ns/docbook"
xml:id="function.parse-ini-file">
<refnamediv>
@@ -227,6 +227,41 @@
</screen>
</example>
</para>
+ <para>
+ <example>
+ <title><function>parse_ini_file</function> ã«ãã php.ini
ãã¡ã¤ã«ã®ãã¼ã¹</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+//
以ä¸ã®çµæãæ¯è¼ããããã®ç°¡åãªé¢æ°
+function yesno($expression)
+{
+ return($expression ? 'Yes' : 'No');
+}
+
+// php.ini ã¸ã®ãã¹ã the php_ini_loaded_file()
颿°ã§åå¾ãã¾ã
+// ãã®é¢æ°ã¯ PHP 5.2.4 以éã§ä½¿ç¨å¯è½ã§ã
+$ini_path = php_ini_loaded_file();
+
+// php.ini ããã¼ã¹ãã¾ã
+$ini = parse_ini_file($ini_path);
+
+// çµæã表示ãã¦æ¯è¼ãã¾ããget_cfg_var()
ã使ç¨ããã¨ã
+//
ããã§ãã¼ã¹ãã¦èªã¿è¾¼ãã ã®ã¨åãçµæãå¾ããããã¨ã«æ³¨æãã¾ããã
+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">