cvs: phpdoc-zh /chapters config.xml

From: Date: Fri, 13 Sep 2002 03:36:24 +0000
Subject: cvs: phpdoc-zh /chapters config.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-552@lists.php.net to get a copy of this message
dallas Thu Sep 12 23:36:24 2002 EDT Modified files: /phpdoc-zh/chapters config.xml Log: ÔÝʱÓÃÓ¢ÎÄÎļþÒÔ±ÜÃâmake³ö´í

Index: phpdoc-zh/chapters/config.xml diff -u phpdoc-zh/chapters/config.xml:1.6 phpdoc-zh/chapters/config.xml:1.7 --- phpdoc-zh/chapters/config.xml:1.6 Wed Sep 11 23:37:52 2002 +++ phpdoc-zh/chapters/config.xml Thu Sep 12 23:36:23 2002 @@ -1,31 +1,47 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- $Author: gregory $ --> -<!-- EN-Revision: 1.73 Maintainer: verdana Status: recovered --> +<?xml version="1.0" encoding="gb2312"?> +<!-- $Revision: 1.7 $ --> +<!-- $Author: dallas $ --> +<!-- EN-Revision: 1.74 Maintainer: Gregory Status: ready --> <chapter id="configuration"> - <title>ÉèÖÃ</title> + <title>Configuration</title> <sect1 id="configuration.file"> - <title>ÉèÖÃÎļþ</title> + <title>The configuration file</title> <simpara> - µ± PHP Æô¶¯µÄʱºò£¬»á¶Á³öÉèÖÃÎļþ£¨ÔÚ PHP 3.0 ÖУ¬¸ÃÎļþÃûΪ <filename>php3.ini</filename>£¬ÔÚ PHP 4.0 ÖУ¬ÆäÃû³ÆÎª &php.ini;£©µÄÄÚÈÝ¡£¶ÔÓÚ PHP µÄ·þÎñÆ÷Ä£¿é°æ±¾£¬ÉèÖÃÎļþµÄ¶ÁÈ¡½öÔÚ WEB ·þÎñÆ÷Æô¶¯Ê±Ö´ÐС£¶ÔÓÚ <acronym>CGI</acronym> ºÍ <acronym>CLI</acronym> °æ±¾£¬Ã¿´ÎÖ´Ðж¼Òª¶ÁÈ¡ÉèÖᣠ+ The configuration file (called <filename>php3.ini</filename> in + PHP 3.0, and simply &php.ini; as of PHP 4.0) + is read when PHP starts up. For the server module versions of PHP, + this happens only once when the web server is started. For the + <acronym>CGI</acronym> and <acronym>CLI</acronym> version, it happens on + every invocation. </simpara> <para> - &php.ini; µÄĬÈÏλÖÃÊÇÔÚ PHP ±»±àÒëʱÉèÖõÄÑ¡ÏÇë²ÎÔÄ <link linkend="faq.installation.phpini">FAQ</link> ÖеÄÏà¹ØÌõÄ¿£©£¬µ«¶ÔÓÚ <acronym>CGI</acronym> ºÍ <acronym>CGI</acronym> °æ±¾£¬¸ÃÖµ¿ÉÒÔͨ¹ý <literal>-c</literal> ÃüÁîÐвÎÊýÀ´ÉèÖã¬Çë²ÎÔÄ¡°<link - linkend="features.commandline"><literal>PHP</literal> µÄÃüÁîÐÐģʽ</link>¡±ÓйØÕ½ڡ£ÄúÒ²¿ÉÒÔͨ¹ýÉèÖû·¾³±äÁ¿ <literal>PHPRC</literal> À´ÉèÖà &php.ini; Îļþ¶îÍâµÄËÑË÷·¾¶¡£ + The default location of &php.ini; is a compile time option (see the <link + linkend="faq.installation.phpini">FAQ</link> entry), but can be changed + for the <acronym>CGI</acronym> and <acronym>CLI</acronym> version with the + <literal>-c</literal> command line switch, see the chapter about using + <literal>PHP</literal> from the <link + linkend="features.commandline">command line</link>. You can also use the + environment variable <literal>PHPRC</literal> for an additional path to + search for a &php.ini; file. </para> <para> - һϲ¢Ã»ÓÐÁгöËùÓÐµÄ PHP ÉèÖÃÑ¡Ïî¡£Èç¹ûÄúÐèÒªÁ˽âËùÓÐµÄ PHP ÉèÖÃÑ¡ÏÇëÔĶÁ &php.ini; ÎļþÖеÄ×¢ÊÍÐÅÏ¢¡£Äú¿ÉÒÔÔÚ<ulink url="&url.php.cvs.phpini;">ÕâÀï</ulink>·ÃÎÊ CVS ÌṩµÄ×îÐ嵀 &php.ini; Îļþ¡£ + Not every PHP directive is documented below. For a list of all directives, + please read your well commented &php.ini; file. You may want to view the + latest <ulink url="&url.php.cvs.phpini;">php.ini here</ulink> from CVS. </para> <note> <para> - PHP ÉèÖÃÑ¡Ïî <link linkend="ini.register-globals">register_globals</link> µÄĬÈÏÖµ×Ô <ulink url="&url.php.release4.2.0;">4.2.0</ulink> ÒÔºóÓÉ <emphasis>on</emphasis> ±äΪÁË <emphasis>off</emphasis>¡£ + The default value for the PHP directive + <link linkend="ini.register-globals">register_globals</link> changed from + <emphasis>on</emphasis> to <emphasis>off</emphasis> in PHP + <ulink url="&url.php.release4.2.0;">4.2.0</ulink>. </para> </note> <para> <example> - <title>&php.ini; ·¶Àý</title> + <title>&php.ini; example</title> <programlisting role="ini"> <![CDATA[ ; any text on a line after an unquoted semicolon (;) is ignored @@ -48,68 +64,75 @@ </para> <simpara> - µ±°Ñ PHP ÓÃ×÷ Apache µÄÄ£¿éµÄʱºò£¬ÄúÒ²¿ÉÒÔͨ¹ý¸ü¸Ä Apache µÄÉèÖÃÎļþºÍ .htaccess Îļþ£¨ÐèÒª¡°AllowOverride Options¡± »òÕß ¡°AllowOverride All¡±È¨ÏÞ£©À´ÐÞ¸ÄÕâЩѡÏîÉ趨¡£ + When using PHP as an Apache module, you can also change the + configuration settings using directives in Apache configuration + files and .htaccess files (You will need "AllowOverride + Options" or "AllowOverride All" privileges) </simpara> <simpara> - ¶ÔÓÚ PHP 3.0£¬<filename>php3.ini</filename> ÎļþÖÐÿһ¸öÉèÖÃÑ¡ÏîÔÚ Apache µÄÉèÖÃÖж¼ÓжÔÓ¦µÄÏîÄ¿£¬µ«²»°üÀ¨ÒÔ¡°php3_¡±¿ªÍ·µÄÑ¡Ïî¡£ + With PHP 3.0, there are Apache directives that correspond to each + configuration setting in the <filename>php3.ini</filename> name, + except the name is prefixed by "php3_". </simpara> <para> - ¶ÔÓÚ PHP 4.0£¬ÔÚ Apache ÖÐÓÐÒÔÏÂÑ¡ÏîʹµÃÄú¿ÉÒÔÔÚ Apache µÄÉèÖÃÎļþÖиü¸Ä PHP ÉèÖᣠ+ With PHP 4.0, there are several Apache directives that allow you + to change the PHP configuration from within the Apache + configuration file itself. <variablelist> <varlistentry> <term> <systemitem role="directive">php_value</systemitem> - <parameter>Ãû³Æ</parameter> - <parameter>Öµ</parameter> + <parameter>name</parameter> + <parameter>value</parameter> </term> <listitem> <para> - É趨ָ¶¨±äÁ¿µÄÖµ¡£ - </para> + This sets the value of the specified variable.</para> </listitem> </varlistentry> <varlistentry> <term> <systemitem role="directive">php_flag</systemitem> - <parameter>Ãû³Æ</parameter> + <parameter>name</parameter> <parameter>on|off</parameter> </term> <listitem> <para> - ÉèÖò¼¶ûֵѡÏîµÄÖµ¡£ - </para> + This is used to set a Boolean configuration option.</para> </listitem> </varlistentry> <varlistentry> <term> <systemitem role="directive">php_admin_value</systemitem> - <parameter>Ãû³Æ</parameter> - <parameter>Öµ</parameter> + <parameter>name</parameter> + <parameter>value</parameter> </term> <listitem> <para> - ÉèÖÃÖ¸¶¨±äÁ¿µÄÖµ¡£¡°Admin¡±ÉèÖÃÑ¡ÏîµÄÉèÖýöÄÜÔÚ Apache µÄÉèÖÃÎļþÖнøÐУ¬¶ø²»ÄÜÔÚ .htaccess ÎļþÖнøÐС£ - </para> + This sets the value of the specified variable. "Admin" + configuration settings can only be set from within the + main Apache configuration files, and not from .htaccess + files.</para> </listitem> </varlistentry> <varlistentry> <term> <systemitem role="directive">php_admin_flag</systemitem> - <parameter>Ãû³Æ</parameter> + <parameter>name</parameter> <parameter>on|off</parameter> </term> <listitem> <para> - ÉèÖò¼¶ûֵѡÏîµÄÖµ¡£</para> + This is used to set a Boolean configuration option.</para> </listitem> </varlistentry> </variablelist> </para> <para> <example> - <title>Apache ÉèÖ÷¶Àý</title> + <title>Apache configuration example</title> <programlisting role="ini"> <![CDATA[ <IfModule mod_php4.c> @@ -126,17 +149,26 @@ <note> <para> - PHP µÄ³£Á¿²»´æÔÚÓÚ PHP Ö®Íâ¡£ÀýÈ磬ÔÚ <filename>httpd.conf</filename> ÖÐûÓÐʹÓÃÖîÈç <constant>E_ALL</constant> »òÕß <constant>E_NOTICE</constant> µÈ PHP ³£Á¿À´ÉèÖà <link linkend="ini.error-reporting">error_reporting</link> Ñ¡ÏîµÄÖµ£¬ÒòΪËüÃÇÊÇûÓÐÒâÒåµÄ£¬ÆäÖµµÈÓÚ0¡£ÇëʹÓöÔÓ¦µÄ¶þ½øÖÆÎ»ÑÚÂëÖµÀ´´úÌæ£¬ÕâЩ³£Á¿¿ÉÒÔÓÃÓÚ &php.ini;¡£ + PHP constants do not exist outside of PHP. For example, in + <filename>httpd.conf</filename> do not use PHP constants + such as <constant>E_ALL</constant> or <constant>E_NOTICE</constant> + to set the <link linkend="ini.error-reporting">error_reporting</link> + directive as they will have no meaning and will evaluate to + <emphasis>0</emphasis>. Use the associated bitmask values instead. + These constants can be used in &php.ini; </para> </note> </para> <simpara> - Äú¿ÉÒÔͨ¹ý <function>phpinfo</function> º¯ÊýµÄÊä³öÀ´²é¿´Ñ¡ÏîÖµµÄÉ趨¡£Ò²¿ÉÒÔͨ¹ý <function>ini_get</function> »òÕß <function>get_cfg_var</function> º¯ÊýÀ´µ¥¶ÀµÄ·ÃÎÊijһ¸öÉ趨ѡÏîµÄÖµ¡£ + You can view the settings of the configuration values in + the output of <function>phpinfo</function>. You can also + access the values of individual configuration settings using + <function>ini_get</function> or <function>get_cfg_var</function>. </simpara> <sect2 id="ini.sect.general"> - <title>Ò»°ãÉèÖÃÑ¡Ïî</title> + <title>General Configuration Directives</title> <para> <variablelist> <varlistentry id="ini.allow-url-fopen"> @@ -1403,170 +1435,6 @@ </variablelist> </sect2> - <sect2 id="ini.sect.informix"> - <title>Informix Configuration Directives</title> - <variablelist> - - <varlistentry id="ini.ifx.allow-persistent"> - <term> - <parameter>ifx.allow_persistent</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Whether to allow persistent Informix connections. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.max-persistent"> - <term> - <parameter>ifx.max_persistent</parameter> - <type>integer</type> - </term> - <listitem> - <para> - The maximum number of persistent Informix connections per - process. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.max-links"> - <term> - <parameter>ifx.max_links</parameter> - <type>integer</type> - </term> - <listitem> - <para> - The maximum number of Informix connections per process, including - persistent connections. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.default-host"> - <term> - <parameter>ifx.default_host</parameter> - <type>string</type> - </term> - <listitem> - <para> - The default host to connect to when no host is specified - in <function>ifx_connect</function> or - <function>ifx_pconnect</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.default-user"> - <term> - <parameter>ifx.default_user</parameter> - <type>string</type> - </term> - <listitem> - <para> - The default user id to use when none is specified - in <function>ifx_connect</function> or - <function>ifx_pconnect</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.default-password"> - <term> - <parameter>ifx.default_password</parameter> - <type>string</type> - </term> - <listitem> - <para> - The default password to use when none is specified - in <function>ifx_connect</function> or - <function>ifx_pconnect</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.blobinfile"> - <term> - <parameter>ifx.blobinfile</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Set to &true; if you want to return blob columns - in a file, &false; if you want them in memory. You can - override the setting at runtime - with <function>ifx_blobinfile_mode</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.textasvarchar"> - <term> - <parameter>ifx.textasvarchar</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Set to &true; if you want to return TEXT columns - as normal strings in select statements, - &false; if you want to use blob id parameters. You can - override the setting at runtime with - <function>ifx_textasvarchar</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.byteasvarchar"> - <term> - <parameter>ifx.byteasvarchar</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Set to &true; if you want to return BYTE columns - as normal strings in select queries, - &false; if you want to use blob id parameters. You can - override the setting at runtime with - <function>ifx_textasvarchar</function>. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.charasvarchar"> - <term> - <parameter>ifx.charasvarchar</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Set to &true; if you want to trim trailing spaces - from CHAR columns when fetching them. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.ifx.nullformat"> - <term> - <parameter>ifx.nullformat</parameter> - <type>boolean</type> - </term> - <listitem> - <para> - Set to &true; if you want to return &null; columns - as the literal string "&null;", &false; if you want - them returned as the empty string "". You can - override this setting at runtime with - <function>ifx_nullformat</function>. - </para> - </listitem> - </varlistentry> - - - </variablelist> - </sect2> - <sect2 id="ini.sect.bcmath"> <title>BC Math Configuration Directives</title> <variablelist> @@ -1677,118 +1545,7 @@ </variablelist> </sect2> - <sect2 id="ini.sect.exif"> - <title>Exif Configuration Directives</title> - <para> - Exif supports automatically conversion for Unicode and JIS - character encodings of user comments when module mbstring - is available. This is done by first decoding the comment - using the specified characterset. The result is then encoded - with another characterset which should match your - <literal>HTTP</literal> output. - <variablelist> - - <varlistentry id="ini.exif.encode_unicode"> - <term> - <parameter>exif.encode_unicode</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.encode_unicode</literal> defines the - characterset UNICODE user comments are handled. - This defaults to ISO-8859-15 which should work for - most non asian countries. The setting can be empty - or must be an encoding supported by mbstring. If it - is empty the current internal encoding of mbstring is - used. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.exif.decode_unicode_motorola"> - <term> - <parameter>exif.decode_unicode_motorola</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.decode_unicode_motorola</literal> defines - the image internal characterset for Unicode encoded user - comments if image is in motorola byte order (big-endian). - This setting cannot be empty but you can specify a list - of encodings supported by mbstring. The default is UCS-2BE. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.exif.decode_unicode_intel"> - <term> - <parameter>exif.decode_unicode_intel</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.decode_unicode_intel</literal> defines - the image internal characterset for Unicode encoded user - comments if image is in intel byte order (little-endian). - This setting cannot be empty but you can specify a list - of encodings supported by mbstring. The default is UCS-2LE. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.exif.encode_jis"> - <term> - <parameter>exif.encode_jis</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.encode_jis</literal> defines the - characterset JIS user comments are handled. - This defaults to an empty value which forces - the functions to use the current internal encoding - of mbstring. - </para> - </listitem> - </varlistentry> - - <varlistentry id="ini.exif.decode_jis_motorola"> - <term> - <parameter>exif.decode_jis_motorola</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.decode_jis_motorola</literal> defines - the image internal characterset for JIS encoded user - comments if image is in motorola byte order (big-endian). - This setting cannot be empty but you can specify a list - of encodings supported by mbstring. The default is JIS. - </para> - </listitem> - </varlistentry> - <varlistentry id="ini.exif.decode_jis_intel"> - <term> - <parameter>exif.decode_jis_intel</parameter> - <type>string</type> - </term> - <listitem> - <para> - <literal>exif.decode_jis_intel</literal> defines - the image internal characterset for JIS encoded user - comments if image is in intel byte order (little-endian). - This setting cannot be empty but you can specify a list - of encodings supported by mbstring. The default is JIS. - </para> - </listitem> - </varlistentry> - - </variablelist> - </para> - </sect2> </sect1>
« previous php.doc.zh (#552) next »