cvs: phpdoc /kr/chapters config.xml /kr/language variables.xml
| From: | WonHee Hwang | Date: | Thu, 08 Feb 2001 09:26:03 +0000 |
| Subject: | cvs: phpdoc /kr/chapters config.xml /kr/language variables.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969334247@lists.php.net to get a copy of this message | ||
regina Thu Feb 8 01:26:03 2001 EDT
Modified files:
/phpdoc/kr/chapters config.xml
/phpdoc/kr/language variables.xml
Log:
PR: done!
Submitted by: regina
Reviewed by:
Obtained from:
Index: phpdoc/kr/chapters/config.xml diff -u phpdoc/kr/chapters/config.xml:1.1 phpdoc/kr/chapters/config.xml:1.2 --- phpdoc/kr/chapters/config.xml:1.1 Mon Jan 8 02:18:54 2001 +++ phpdoc/kr/chapters/config.xml Thu Feb 8 01:26:02 2001 @@ -123,7 +123,7 @@ í¸ì¶ë íì¼ì <function>include</function> í¨ì를 íµí´ì í¬í¨ëë¯ë¡ <link linkend="ini.include-path">include_path</link> ì§ììê° ì ì©ëë¤.</para> <para> - <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-appendingì´ disableëë¤. + <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-appendingì´ disableëë¤. <note> <simpara> ë§ì½ ì¤í¬ë¦½í¸ê° <function>exit</function>ë¡ ì¢ ë£ëê² ëë©´ auto-appendë ì¼ì´ëì§ ìëë¤. </simpara> @@ -142,7 +142,7 @@ í¸ì¶ë íì¼ì <function>include</function> í¨ì를 íµí´ì í¬í¨ëë¯ë¡ <link linkend="ini.include-path">include_path</link> ì§ììê° ì ì©ëë¤.</para> <para> - <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-prependingì´ disableëë¤.</para> + <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-prependingì´ disableëë¤.</para> </listitem> </varlistentry> <varlistentry id="ini.cgi-ext"> @@ -262,7 +262,7 @@ ë°ë¼ì ì´ ì íì í¼í기 ìí´ symbolic link를 ì¬ì©íë ê²ì ë°©ì§í ì ìë¤. </para> <para> - <systemitem class="constant">.</systemitem>.ì´ë¼ë ê°ì 주면 ì¤í¬ë¦½í¸ íì¼ì´ ìë ëë í ë¦¬ê° base-directoryë¡ ì§ì ëë¤. + <systemitem class="constant">.</systemitem>.ì´ë¼ë ê°ì 주면 ì¤í¬ë¦½í¸ íì¼ì´ ìë ëë í ë¦¬ê° base-directoryë¡ ì§ì ëë¤. </para> <para> Windowsììë ì¸ë¯¸ì½ë¡ (;)ì¼ë¡, ë¤ë¥¸ OSììë ì½ë¡ (:)ì¼ë¡ 구ë¶íë¤. @@ -310,7 +310,7 @@ </term> <listitem> <para> - <function>require</function>ì <function>include</function>, <function>fopen_with_path</function> + <function>require</function>ì <function>include</function>, <function>fopen_with_path</function> í¨ìë¤ì´ ì¬ì©íë íì¼ì ì°¾ì ìì¹(path)를 ì§ì íë¤. stringì íìì ìì¤í íê²½ë³ì <envar>PATH</envar>ì ì¤ì ê³¼ ë¹ì·íë¤. UNIXììë ì½ë¡ ì¼ë¡ ëëì´ì§ ëë í 리ë¤ì 리ì¤í¸ì´ê³ , Windowsììë ì¸ë¯¸ì½ë¡ ì ì¬ì©íë¤. @@ -433,18 +433,19 @@ </term> <listitem> <para> - Tells whether or not to register the EGPCS (Environment, GET, - POST, Cookie, Server) variables as global variables. You may - want to turn this off if you don't want to clutter your - scripts' global scope with user data. This makes the most - sense when coupled with <link linkend="ini.track-vars">track_vars</link> - in which case - you can access all of the EGPCS variables through the + EGPCS (Environment, GET, POST, Cookie, Server) ë³ìë¤ì ì ì ë³ìë¡ ì¤ì í ê²ì¸ê°ë¥¼ ì íë¤. + ì¬ì©ìì ë°ì´í를 ì¤í¬ë¦½í¸ì ì ì ë³ì ììì ëì¡íê² ììë기를 ìíì§ ìëë¤ë©´ + ì´ ì¤ì ì 꺼ëë ê²ì´ ì¢ë¤. + ì´ ì¤ì ì <link linkend="ini.track-vars">track_vars</link> ì¤ì 를 + ê³ ë ¤í´ì ì¬ì©íë©´ ë§¤ì° ì ì©íê² ì¬ì©í ì ìë¤. + <link linkend="ini.track-vars">track_vars</link>ì¤ì ì ì¼ ëì¼ë©´ + ì¬ì©ìì EGPCS ë³ìë¤ì 모ë <varname>$HTTP_ENV_VARS</varname>, <varname>$HTTP_GET_VARS</varname>, <varname>$HTTP_POST_VARS</varname>, - <varname>$HTTP_COOKIE_VARS</varname>, and - <varname>$HTTP_SERVER_VARS</varname> - arrays in the global scope. + <varname>$HTTP_COOKIE_VARS</varname>, + <varname>$HTTP_SERVER_VARS</varname> + ë°°ì´ì íµí´ ì ì ìì(global scope)ìì ì ê·¼ê°ë¥íê² ëë¤. </para> </listitem> </varlistentry> @@ -573,7 +574,7 @@ </term> <listitem> <para> - <command>sendmail</command> íë¡ê·¸ë¨ì ì°¾ì Path. + <command>sendmail</command> íë¡ê·¸ë¨ì ì°¾ì Path. ë³´íµì <filename>/usr/sbin/sendmail</filename>ì´ë <filename>/usr/lib/sendmail</filename>ì ìë¤. <command>configure</command> íë¡ê·¸ë¨ì´ sendmailì ìì¹ë¥¼ ì°¾ì ì´ê²ì 기본ê°ì¼ë¡ ì¤ì í´ ì£¼ì§ë§, ê·¸ê²ì´ ìëì§ ììê±°ë ì¤ë¥ê° ìì ë, ì¬ë¬ë¶ì ì¬ê¸°ì ì§ì ì§ì í´ ì¤ ì ìë¤. </para> @@ -851,10 +852,10 @@ </term> <listitem> <para> - Name of BS2000 PLAM library containing the loadable SESAM - driver modules. Required for using SESAM functions. The - BS2000 PLAM library must be set ACCESS=READ,SHARE=YES - because it must be readable by the apache server's user id. + SESAM ëë¼ì´ë² 모ëì í¬í¨íê³ ìë BS2000 PLAM ë¼ì´ë¸ë¬ë¦¬ì ì´ë¦ + SESAM í¨ì를 ì¬ì©íë ¤ë©´ ê¼ ì§ì í´ ì£¼ì´ì¼ íë¤. + ê·¸ë¦¬ê³ , BS2000 PLAM ë¼ì´ë¸ë¬ë¦¬ë ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìëë¡ + ACCESS=READ,SHARE=YESë¡ ì¤ì í´ì¼ íë¤. </para> </listitem> </varlistentry> @@ -865,14 +866,13 @@ </term> <listitem> <para> - Name of SESAM application configuration file. Required for - using SESAM functions. The BS2000 file must be readable by - the apache server's user id. + SESAM ì´í리ì¼ì´ì ì¤ì íì¼ì ì´ë¦. + SESAM í¨ì를 ì¬ì©íë ¤ë©´ ê¼ ì§ì í´ ì£¼ì´ì¼ íë¤. + BS2000 íì¼ì ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìì´ì¼ íë¤. </para> <para> - The application configuration file will usually contain a - configuration like (see SESAM - reference manual): + SESAM ì´í리ì¼ì´ì ì¤ì íì¼ì ë³´íµ ë¤ìê³¼ ê°ì ë´ì©ì¼ë¡ ì¤ì ëì´ ìë¤. + (SESAM reference manualì ì´í´ë³´ë¼) : <informalexample> <programlisting role="bs2000"> CNF=B @@ -889,14 +889,13 @@ </term> <listitem> <para> - Name of SESAM message catalog file. In most cases, this - directive is not neccessary. Only if the SESAM message file - is not installed in the system's BS2000 message file table, - it can be set with this directive. + SESAM message catalog íì¼ì ì´ë¦. ëë¶ë¶ì ê²½ì° ì´ ì§ììë íì ìë¤. + ë¨ì§ SESAM message íì¼ì´ BS2000 message íì¼ í ì´ë¸ì ì¤ì ëì´ ìì§ ìì ê²½ì°ì + ì´ ì§ìì를 ì¬ì©íì¬ ì¤ì íë¤. </para> <para> - The message catalog must be set ACCESS=READ,SHARE=YES because - it must be readable by the apache server's user id. + message catalogë ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìëë¡ + ACCESS=READ,SHARE=YESë¡ ì¤ì í´ì¼ íë¤. </para> </listitem> </varlistentry> @@ -1085,7 +1084,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì í¸ì¤í¸ê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 í¸ì¤í¸. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì í¸ì¤í¸ê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 í¸ì¤í¸. </para> </listitem> </varlistentry> @@ -1096,7 +1096,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì user idê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 user id. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì user idê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 user id. </para> </listitem> </varlistentry> @@ -1107,7 +1108,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì passwordê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 password. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì passwordê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 password. </para> </listitem> </varlistentry> @@ -1118,10 +1120,9 @@ </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>. + blob ì¹¼ë¼ì íì¼ìì ë°ííë ¤ íë¤ë©´ true를, + ë©ëª¨ë¦¬ìì ë°ííë ¤ë©´ false를 ì¤ì íë¤. + ì´ ì¤ì ì <function>ifx_blobinfile_mode</function> í¨ì를 ì¬ì©íì¬ ì¤íì¤ì ë³ê²½í ì ìë¤. </para> </listitem> </varlistentry> @@ -1220,7 +1221,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì ODBC data source ê° ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> @@ -1232,7 +1233,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì User nameì´ ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> @@ -1244,7 +1245,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì Passwordê° ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> Index: phpdoc/kr/language/variables.xml diff -u phpdoc/kr/language/variables.xml:1.2 phpdoc/kr/language/variables.xml:1.3 --- phpdoc/kr/language/variables.xml:1.2 Mon Jan 29 18:25:41 2001 +++ phpdoc/kr/language/variables.xml Thu Feb 8 01:26:03 2001 @@ -1,22 +1,59 @@ -<!-- edited with XML Spy v3.0.7 (http://www.xmlspy.com) by panda (bra) --><chapter id="language.variables"> <title>ë³ì (Variables)</title> <sect1 id="language.variables.basics"> <title>기본(Basics)</title> <simpara> PHPìì ë³ìë ì´ë¦ìì ë¬ë¬íì($)를 ë¶ì¬ì ì¬ì©íë¤. ëí ë³ìëª ì ìì´ ëì문ìë 구ë¶íë¤. </simpara> <para> ë³ìëª ì PHPë´ì ë¤ë¥¸ ë¼ë²¨ëª ì ì ìíë ê²ê³¼ ëì¼í ê·ì¹ì ì ì© ë°ëë¤. ì í¨í ë³ìëª ì 문ìë í¹ì ì¸ëì¤ì½ì(_)ë¡ ììíì¬ì¼ íê³ , ëë²ì§¸ 문ìë¶í°ë 문ìë ì«ì,ì¸ëì¤ì½ìë±ì ì¬ì©í ì ìê³ ê¸¸ì´ìë ì íì´ ìë¤. ì ê·ìì¼ë¡ íííìë©´ ë¤ìê³¼ ê°ì´ ëíë¼ì ìë¤. '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' - </para> <note> <simpara> - a-z, A-Z ì¬ì´ì ìí벳과 ASCII code 127ë¶í° 255ê¹ì§ë¥¼ ì미íë¤ (0x7f-0xff). - </simpara> </note> <para> <informalexample> <programlisting role="php"> +<chapter id="language.variables"> + <title>ë³ì (Variables)</title> + <sect1 id="language.variables.basics"> + <title>기본(Basics)</title> + <simpara> + PHPìì ë³ìë ë³ìëª ìì ë¬ë¬íì($)를 ë¶ì¬ì ì¬ì©íë¤. + ëí ë³ìëª ì ìì´ ëì문ìë 구ë¶íë¤. + </simpara> + <para> + ë³ìëª ì PHPë´ì ë¤ë¥¸ ë¼ë²¨ëª ì ì ìíë ê²ê³¼ ëì¼í ê·ì¹ì ì ì© ë°ëë¤. + ì í¨í ë³ìëª ì 문ìë í¹ì ë°ì¤(_)ë¡ ììíì¬ì¼ íê³ , + ëë²ì§¸ 문ìë¶í°ë 문ìë ì«ì,ë°ì¤ ë±ì ì¬ì©í ì ìê³ ê¸¸ì´ìë ì íì´ ìë¤. + ì ê·ìì¼ë¡ íííìë©´ ë¤ìê³¼ ê°ì´ ëíë¼ì ìë¤. : + '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' + </para> + <note> + <simpara> + ì¬ê¸°ì 문ìë a-z, A-Z ì¬ì´ì ìí벳과 ASCII ì½ë 127ë¶í° 255ê¹ì§(0x7f-0xff)를 ì미íë¤ + </simpara> + </note> + <para> + <informalexample> + <programlisting role="php"> +$var = "Bob"; $Var = "Joe"; echo "$var, $Var"; $4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ $_4site = 'not yet'; // ì¸ëì¤ì½ìë¡ ììë ë³ìë ì¬ì©í ì ìë¤. $t_e = 'mansikka'; // '_ë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. $var = "Bob"; $Var = "Joe"; -echo "$var, $Var"; // ê²°ê³¼ê°ì "Bob, Joe" +echo "$var, $Var"; // ê²°ê³¼ê°ì "Bob, Joe" -$4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ -$_4site = 'not yet'; // ì¸ëì¤ì½ìë¡ ììë ë³ìë ì¬ì©í ì ìë¤. -$t_e = 'mansikka'; // '_ë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. - </programlisting> </informalexample> </para> <para> PHP 3 ìì ë³ìë íì ê°ì ê°ì§ê³ ìë¤. ì´ë ë¤ìë§í´ì, ííìì ê°ì ë³ìì ì ì©íë©´ ííìì ê²°ê³¼ê°ì´ ë³ìë¡ ë³µì¬ëë¤. ííìì ê°ì ë³ìì ë³µì¬íë¯ë¡ ë³µì¬ëê³ ë íì ííìì ë³íë ë³ìì ëì´ì ìí¥ì ì£¼ì§ ìëë¤ê³ í ì ìë¤. ì´ì ëí ìì¸í ì¤ëª ì <link linkend="language.expressions">ííì(Expressions)</link>ì 참조í기 ë°ëë¤. - </para> <para> PHP 4 ììë ë³ìì ê°ì ì§ì íë ë¤ë¥¸ ë°©ë²ì ì ìíê³ ìë¤: <emphasis>참조(reference)를 ì¬ì©í ê° ì§ì (assign)</emphasis>. ì´ë ìë¡ì´ ë³ìê° ê°ì ë³µì¬íì¬ ê°ì§ê³ ì¤ë ê²ì´ ìëë¼ ìë ê°ì´ ìë ê³³ì ë¨ìí 참조íë ë°©ë²ì´ë¤. ìë ê°ì´ ìë ë³ìì ë³ì¹ì´ ëë¤ë¼ê³ í ìë ìê³ ìë ë³ì를 ê°ë¦¬í¨ë¤ê³ ííí ìë ìê² ë¤. ìë¡ì´ ë³ìê°ì ë³íë ìëë³ìì ê°ì ìí¥ì ì£¼ê³ ë°ëë¡ ìëë³ìì ê°ì´ ë³íì¬ë ìë¡ì´ ë³ìì ìí¥ì 미ì¹ë¤. ê²°ì½ ê°ì ë³µì¬íë ê²ê³¼ë ë¤ë¥¸ ê°ë ì´ë¼ í ì ìë¤. ë°ë¼ì í¬ê¸°ê° í° ë°°ì´ì´ë ê°ì²´ë¥¼ ì§ì í ëë ë°ë³µë¬¸ì ìííëë° ìì´ ìíìëê° ë¹¨ë¼ì¡ë¤. </para> <para> - To assign by reference, simply prepend an ampersand (&) to the - beginning of the variable which is being assigned (the source - variable). For instance, the following code snippet outputs 'My - name is Bob' twice: +$4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ +$_4site = 'not yet'; // ë°ì¤ë¡ ììë ë³ìë ì¬ì©í ì ìë¤. +$täe = 'mansikka'; // 'äë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. + </programlisting> + </informalexample> + </para> + <para> + PHP 3 ìì ë³ìë íì ê°ì ê°ì§ê³ ìë¤. + ë¤ìë§í´ì, ííìì ê°ì ë³ìì ì ì©íë©´ ííìì ê²°ê³¼ê°ì´ ë³ìë¡ ë³µì¬ëë¤. + ííìì ê°ì ë³ìì ë³µì¬íë¯ë¡ ë³µì¬ëê³ ë íì ë°ìí ííìì ë³íë ë³ìì ëì´ì ìí¥ì ì£¼ì§ ìëë¤. + ì´ì ëí ìì¸í ì¤ëª ì <link linkend="language.expressions">ííì(Expressions)</link>ì 참조í기 ë°ëë¤. + </para> + <para> + PHP 4 ììë ë³ìì ê°ì ëì íë ë¤ë¥¸ ë°©ë²ì ì ê³µíë¤. : + <emphasis>참조를 ì¬ì©í ê° ëì (assign by reference)</emphasis>. + ì´ë ìë¡ì´ ë³ìê° ê°ì ë³µì¬íì¬ ê°ì§ê³ ì¤ë ê²ì´ ìëë¼ ìë ê°ì´ ìë ê³³ì ë¨ìí 참조íë ë°©ë²ì´ë¤. + ìë ê°ì´ ìë ë³ìì ë³ì¹ì´ ëë¤ë¼ê³ í ìë ìê³ , ìë ë³ì를 ê°ë¦¬í¨ë¤ê³ ííí ìë ìë¤. + ìë¡ì´ ë³ìê°ì ë³íë ìë ë³ìì ê°ì ìí¥ì ì£¼ê³ , ë°ëë¡ ìëë³ìì ê°ì´ ë³íì¬ë ìë¡ì´ ë³ìì ìí¥ì 미ì¹ë¤. + ê°ì ë³µì¬íë ê²ê³¼ë ì í ë¤ë¥¸ ê°ë ì´ë¼ í ì ìë¤. + ë°ë¼ì í¬ê¸°ê° í° ë°°ì´ì´ë ê°ì²´ë¥¼ ì§ì í ëë, ë°ë³µë¬¸ì ìííëë° ìì´ ìíìëê° ë¹¨ë¼ì§ë¤. + </para> + <para> + 참조(reference)를 ì¬ì©í ëì ì íë ¤ë©´, ëì 문ìì ëì íë ¤ë ê°ì ê°ì§ê³ ìë + ë³ì(source ë³ì)ì ìì &를 ë¶ì¬ì£¼ë©´ ëë¤. + ì를ë¤ì´, ë¤ìì ìì ì½ëë 'My name is Bob'ì ëë² ì¶ë ¥íë¤. - <informalexample> <programlisting role="php"> + <informalexample> + <programlisting role="php"> <?php $foo = 'Bob'; // Assign the value 'Bob' to $foo $bar = &$foo; // Reference $foo via $bar. @@ -24,10 +61,14 @@ echo $foo; // $foo is altered too. echo $bar; ?> - </programlisting> </informalexample> </para> <para> - One important thing to note is that only named variables may be - assigned by reference. - <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <para> + ì¬ê¸°ì ì¤ìí íê°ì§ë ì´ë¦ì ê°ì§ê³ ìë ë³ìë§ì´ 참조를 ì¬ì©í ëì ì´ ê°ë¥íë¤ë ê²ì´ë¤. + ì¦, í¹ì í ê°ì &를 ì¬ì©í ì ìë¤ë ê²ì´ë¤. + <informalexample> + <programlisting role="php"> <?php $foo = 25; $bar = &$foo; // This is a valid assignment. @@ -39,182 +80,400 @@ $bar = &test(); // Invalid. ?> - </programlisting> </informalexample> </para> </sect1> <sect1 id="language.variables.predefined"> <title>미리 ì ìë ë³ì (Predefined variables)</title> <simpara>PHPë 모ë ì¤í¬ë¦½í¸ì ëí´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤í ë ë ì¬ë¬ê°ì 미리 ì ìë ë³ì를 ì ê³µíë¤. -ì´ ë³ìì¤ ìë²ì ì¢ ë¥ë ë²ì , 기í ë¤ë¥¸ ìì¸ì¼ë¡ ì¸í´ ë¬ë¼ì§ë ê²ë ë§ìë°, ê·¸ë° ë³ìë ì´ê³³ì 문ìí ëì§ ììë¤. -ëí ì´ ë³ìì¤ ë¤ìë PHPê° command-lineì¼ë¡ ëìí ëë ì¬ì©í ì ìë¤. - </simpara> <simpara> + </programlisting> + </informalexample> + </para> + </sect1> + <sect1 id="language.variables.predefined"> + <title>미리 ì ìë ë³ì (Predefined variables)</title> + <simpara> + PHPë 모ë ì¤í¬ë¦½í¸ì ëí´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤í ë ë ì¬ë¬ê°ì 미리 ì ìë ë³ì를 ì ê³µíë¤. + ì´ ë³ìì¤ ìë²ì ì¢ ë¥ë ë²ì , 기í ë¤ë¥¸ ìì¸ì¼ë¡ ì¸í´ ë¬ë¼ì§ë ê²ë ë§ìë°, ê·¸ë° ë³ìë ì´ê³³ì 문ìí ëì§ ììë¤. + ëí ì´ ë³ìì¤ ë¤ìë PHPê° command-lineì¼ë¡ ëìí ëë ì¬ì©í ì ìë¤. + </simpara> + <simpara> ì´ë° ì¬ë¬ ìì¸ì´ ìì§ë§ ì´ê³³ììë ê°ì¥ ì¼ë°ì ì¸ íê²½ì¸ <ulink url="&url.apache;">Apache</ulink> 1.3.6 ìì 모ëë¡ PHP3를 ì¤ì¹í íê²½ììì 미리 ì ìë ë³ì를 ì´í´ë³´ëë¡ íì. - </simpara> <simpara> + </simpara> + <simpara> ì¬ë¬ë¶ì´ ì¬ì©íë ìì¤í ì 모ë 미리 ì ìë ë³ì를 ë³´ë ¤ë©´ <function>phpinfo</function> í¨ì를 ì¬ì©íì. (ì´ í¨ìë ë¤ë¥¸ ì¬ë¬ ì ì©í ì ë³´ë ìë ¤ì¤ë¤.) - </simpara> <note> <simpara> + </simpara> + <note> + <simpara> ì¬ê¸°ëì¨ ëª©ë¡ì ìì íì§ ìë¤. (ìë²½í ìê°ë ìë¤.) ì´ ëª©ë¡ì ë¨ìí ì¬ë¬ë¶ì ì¤í¬ë¦½í¸ìì ì´ë¤ ì¢ ë¥ì 미리 ì ìë ë³ìê° ì¬ì©ë ì ìëê°ì ììì¼ ë¿ì´ë¤. - </simpara> </note> <sect2 id="language.variables.predefined.apache"> <title>Apache variables</title> <simpara> + </simpara> + </note> + <sect2 id="language.variables.predefined.apache"> + <title>Apache variables</title> + <simpara> ì´ ë³ìë <ulink url="&url.apache;">Apache</ulink> ì¹ìë²ë¡ë¶í° ìì±ë ê²ì´ë¤. ë§ì½ ì¬ë¬ë¶ì´ ë¤ë¥¸ ì¹ìë²ë¥¼ ì¬ì©íê³ ìë¤ë©´ ì´ì ëì¼í ë³ìê° ìì±ëë¤ê³ ë³´ì¥í ì ìë¤. ìë§ë ì¼ë¶ë ìì´ì§ê³ , ì¬ê¸°ì ìë ë³ìê° ìë¡ ì길 ê²ì´ë¤. ì¬ê¸°ì ìë ë³ìì¤ ëë¶ë¶ì <ulink url="&url.cgispec;">CGI 1.1 specification</ulink>ìì ëì¨ ê²ì´ê³ , ê·¸ ë´ì©ëë¡ ì¬ì©ëë¤. - </simpara> <simpara> + </simpara> + <simpara> ì´ê³³ì ìë ë³ìì¤ PHPê° command lineì¼ë¡ ëìí ê²½ì° ì¬ì©ë ì ìë ê²ì ê±°ì ìë¤. - </simpara> <para> <variablelist> <varlistentry> <term>GATEWAY_INTERFACE</term> <listitem> <simpara> + </simpara> + <para> + <variablelist> + <varlistentry> + <term>GATEWAY_INTERFACE</term> + <listitem> + <simpara> ìë²ê° ì¬ì©íê³ ìë CGI specificationì revision. ì: 'CGI/1.1'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_NAME</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_NAME</term> + <listitem> + <simpara> íì¬ ì¤í¬ë¦½í¸ê° ì¤íëê³ ìë í¸ì¤í¸ì ì´ë¦. ë§ì½ ì¤í¬ë¦½í¸ê° ê°ì í¸ì¤í¸ìì ì¤íëê³ ìë¤ë©´, ì´ ê°ì ê°ì í¸ì¤í¸ì ê°ì´ ë ê²ì´ë¤. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_SOFTWARE</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_SOFTWARE</term> + <listitem> + <simpara> ì구ì ëí ëëµì í¤ëì ì¬ì©í ìë² identification 문ìì´ - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_PROTOCOL</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_PROTOCOL</term> + <listitem> + <simpara> íì´ì§ê° ì구ëì´ì§ ë ì¬ì©í íë¡í ì½ì ì´ë¦ê³¼ 리ë¹ì ¼. ì: 'HTTP/1.0'; - </simpara> </listitem> </varlistentry> <varlistentry> <term>REQUEST_METHOD</term> <listitem> <simpara> - Which request method was used to access the page; i.e. 'GET', - 'HEAD', 'POST', 'PUT'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>QUERY_STRING</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REQUEST_METHOD</term> + <listitem> + <simpara> + íì´ì§ê° ì구ë ë ì¬ì©ë method: ì: 'GET', 'HEAD', 'POST', 'PUT'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>QUERY_STRING</term> + <listitem> + <simpara> í´ë¹ íì´ì§ë¥¼ ì ê·¼í ë ì¬ì©ë query string. - </simpara> </listitem> </varlistentry> <varlistentry> <term>DOCUMENT_ROOT</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>DOCUMENT_ROOT</term> + <listitem> + <simpara> íì¬ ì¤í¬ë¦½í¸ê° ìíì¤ì¸ document root ëë í 리. ìë²ì ì¤ì íì¼ì ì ìëì´ ìë¤. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT</term> <listitem> <simpara> - Contents of the <literal>Accept:</literal> header from the - current request, if there is one. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT_CHARSET</term> <listitem> <simpara> - Contents of the <literal>Accept-Charset:</literal> header - from the current request, if there is one. Example: - 'iso-8859-1,*,utf-8'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ENCODING</term> <listitem> <simpara> - Contents of the <literal>Accept-Encoding:</literal> header - from the current request, if there is one. Example: 'gzip'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT_LANGUAGE</term> <listitem> <simpara> - Contents of the <literal>Accept-Language:</literal> header - from the current request, if there is one. Example: 'en'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_CONNECTION</term> <listitem> <simpara> - Contents of the <literal>Connection:</literal> header from - the current request, if there is one. Example: 'Keep-Alive'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_HOST</term> <listitem> <simpara> - Contents of the <literal>Host:</literal> header from the - current request, if there is one. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_REFERER</term> <listitem> <simpara> - The address of the page (if any) which referred the browser - to the current page. This is set by the user's browser; not - all browsers will set this. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_USER_AGENT</term> <listitem> <simpara> - Contents of the <literal>User_Agent:</literal> header from - the current request, if there is one. This is a string - denoting the browser software being used to view the current - page; i.e. <computeroutput>Mozilla/4.5 [en] (X11; U; Linux - 2.2.9 i586)</computeroutput>. Among other things, you can use - this value with <function>get_browser</function> to tailor - your page's functionality to the capabilities of the user's - browser. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REMOTE_ADDR</term> <listitem> <simpara> - The IP address from which the user is viewing the current - page. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REMOTE_PORT</term> <listitem> <simpara> - The port being used on the user's machine to communicate with - the web server. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SCRIPT_FILENAME</term> <listitem> <simpara> - The absolute pathname of the currently executing script. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_ADMIN</term> <listitem> <simpara> - The value given to the SERVER_ADMIN (for Apache) directive in - the web server configuration file. If the script is running - on a virtual host, this will be the value defined for that - virtual host. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_PORT</term> <listitem> <simpara> - The port on the server machine being used by the web server - for communication. For default setups, this will be '80'; - using SSL, for instance, will change this to whatever your - defined secure HTTP port is. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_SIGNATURE</term> <listitem> <simpara> - String containing the server version and virtual host name - which are added to server-generated pages, if enabled. - </simpara> </listitem> </varlistentry> <varlistentry> <term>PATH_TRANSLATED</term> <listitem> <simpara> - Filesystem- (not document root-) based path to the current - script, after the server has done any virtual-to-real - mapping. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SCRIPT_NAME</term> <listitem> <simpara> - Contains the current script's path. This is useful for pages - which need to point to themselves. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REQUEST_URI</term> <listitem> <simpara> - The URI which was given in order to access this page; for - instance, '/index.html'. - </simpara> </listitem> </varlistentry> </variablelist> </para> </sect2> <sect2 id="language.variables.predefined.environment"> <title>Environment variables</title> <simpara> - These variables are imported into PHP's global namespace from the - environment under which the PHP parser is running. Many are - provided by the shell under which PHP is running and different - systems are likely running different kinds of shells, a - definitive list is impossible. Please see your shell's - documentation for a list of defined environment variables. - </simpara> <simpara> - Other environment variables include the CGI variables, placed - there regardless of whether PHP is running as a server module or - CGI processor. - </simpara> </sect2> <sect2 id="language.variables.predefined.php"> <title>PHP variables</title> <simpara> - These variables are created by PHP itself. The - <varname>$HTTP_*_VARS</varname> variables are available only if - the <link linkend="ini.track-vars">track_vars</link> - configuration is turned on. - </simpara> <note> <para> - As of PHP 4.0.3, <link linkend="ini.track-vars">track_vars</link> is always turned on, - regardless of the configuration file setting. - </para> </note> <para> - If the <link linkend="ini.register-globals">register_globals</link> directive - is set, then these variables will also be made available in the - global scope of the script; i.e., separate from the - <varname>$HTTP_*_VARS</varname> arrays. This feature should be - used with care, and turned off if possible; while the - <varname>$HTTP_*_VARS</varname> variables are safe, the bare - global equivalents can be overwritten by user input, with - possibly malicious intent. If you cannot turn off <link linkend="ini.register-globals">register_globals</link>, you must - take whatever steps are necessary to ensure that the data you are - using is safe. - </para> <para> <variablelist> <varlistentry> <term>argv</term> <listitem> <simpara> - Array of arguments passed to the script. When the script is - run on the command line, this gives C-style access to the - command line parameters. When called via the GET method, this - will contain the query string. - </simpara> </listitem> </varlistentry> <varlistentry> <term>argc</term> <listitem> <simpara> - Contains the number of command line parameters passed to the - script (if run on the command line). - </simpara> </listitem> </varlistentry> <varlistentry> <term>PHP_SELF</term> <listitem> <simpara> - The filename of the currently executing script, relative to - the document root. If PHP is running as a command-line - processor, this variable is not available. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_COOKIE_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via HTTP cookies. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_GET_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the HTTP GET method. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_POST_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the HTTP POST method. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_POST_FILES</term> <listitem> <simpara> - An associative array of variables containing information - about files uploaded via the HTTP POST method. See <link linkend="features.file-upload.post-method">POST method - uploads</link> for information on the contents of - <varname>$HTTP_POST_FILES</varname>. - </simpara> <para> <varname>$HTTP_POST_FILES</varname> is available only in PHP - 4.0.0 and later. - </para> </listitem> </varlistentry> <varlistentry> <term>HTTP_ENV_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the parent environment. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_SERVER_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script from the HTTP server. These variables are analogous to - the Apache variables described above. - </simpara> </listitem> </varlistentry> </variablelist> </para> </sect2> </sect1> <sect1 id="language.variables.scope"> <title>ë³ì ì¬ì© ë²ì (Variable Scope)</title> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT_CHARSET</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Charset:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'iso-8859-1,*,utf-8'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ENCODING</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Encoding:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'gzip'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT_LANGUAGE</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Language:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'en'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_CONNECTION</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Connection:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'Keep-Alive'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_HOST</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Host:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_REFERER</term> + <listitem> + <simpara> + íì¬ íì´ì§ë¥¼ ì°¾ìì¨ íì´ì§. íì¬íì´ì§ë¡ ëì´ì¤ë ë§í¬ê° ìê³ , + ì´ ë§í¬ë¥¼ í´ë¦íì¬ íì¬ íì´ì§ë¡ ëì´ì¨ ê²½ì° ì´ì íì´ì§ì 주ìê° ì¤ì ëë¤. + ì´ ê°ì ì¬ì©ìì ë¸ë¼ì°ì ì ë°ë¼ ì¤ì ë ìë ìê³ ìë ìë ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_USER_AGENT</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>User_Agent:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + íì¬ íì´ì§ë¥¼ íë©´ì íìí ë¸ë¼ì°ì ìíí¸ì¨ì´ì ìì§ì´ ëë 문ìì´ì´ë¤. + ì:<computeroutput>Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)</computeroutput> + í¹í, ì´ ê°ì <function>get_browser</function>í¨ìì í¨ê» ì¬ì©íë©´, + í´ë¹ íì´ì§ë¥¼ ìì©ìì ë¸ë¼ì°ì ì ë¥ë ¥ì ë§ì¶°ì ë§ë¤ì´ ë¼ ìë ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REMOTE_ADDR</term> + <listitem> + <simpara> + ì¬ì©ìê° íì¬ íì´ì§ë¥¼ ë³´ê³ ìë ìì¤í ì IP 주ì + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REMOTE_PORT</term> + <listitem> + <simpara> + ì¬ì©ìì ìì¤í ì´ ì¹ìë²ì íµì íê³ ìë port ë²í¸ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SCRIPT_FILENAME</term> + <listitem> + <simpara> + íì¬ ì¤íëê³ ìë ì¤í¬ë¦½í¸ì ì ë ê²½ë¡ëª + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_ADMIN</term> + <listitem> + <simpara> + ì¹ìë² ì¤ì íì¼ìì SERVER_ADMIN (Apacheì ì) ì§ììì ì¤ì ëì´ ìë ê°. + ë§ì½ ì¤í¬ë¦½í¸ê° ê°ì í¸ì¤í¸ ììì ì¤íëê³ ìë¤ë©´ ì´ ê°ì virtual host ì¤ì ë´ì ì¤ì ë ê°ì´ ëë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_PORT</term> + <listitem> + <simpara> + ì¹ìë²ê° ì¬ì©íë port ë²í¸. 기본ê°ì¼ë¡ ë³´íµ '80'ì´ ì¬ì©ëì§ë§, + ì를ë¤ì´ SSLì ì¬ì©íë ê²½ì° ì¬ë¬ë¶ì´ ì§ì í secure HTTP í¬í¸ì ê°ì´ ì¬ì©ëë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_SIGNATURE</term> + <listitem> + <simpara> + server-generated íì´ì§ì ì¶ê°ëë ìë² ë²ì ê³¼ ê°ì í¸ì¤í¸ ëª . (enabledë ê²½ì°ë§) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>PATH_TRANSLATED</term> + <listitem> + <simpara> + 모ë virtualì realë¡ì ì íì ë§ì¹ í, íì¬ íì´ì§ì íì¼ìì¤í 기ì¤ì ê²½ë¡. + (document root 기ì¤ì´ ìëë¤.) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SCRIPT_NAME</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì ê²½ë¡. ì´ê²ì í´ë¹ íì´ì§ê° ì기 ìì ì ê°ë¦¬í¬ ë ì¬ì©íë©´ ì ì©íë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REQUEST_URI</term> + <listitem> + <simpara> + ì´ íì´ì§ë¥¼ ì ê·¼í기 ìí´ ì¬ì©í URI. ì: '/index.html'. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect2> + <sect2 id="language.variables.predefined.environment"> + <title>íê²½ ë³ì (Environment variables)</title> + <simpara> + ì´ ë³ìë¤ì PHP íìê° ì¤íëê³ ìë íê²½ ë³ìë¡ ë¶í° PHPì ì ì ë³ì ììì¼ë¡ ì®ê²¨ì§ ë³ìë¤ì´ë¤. + ë§ì ë³ìë PHPê° ì¤íëë ììì ì ê³µíê³ ìê³ , ê·¸ ë´ì©ì ìì¤í ê³¼ ìì ë°ë¼ 모ë ê°ê° ë¤ë¥´ê¸° + ë문ì ëª íí ë³ìë¤ì 목ë¡ì ì ìíë ê²ì ë¶ê°ë¥íë¤. + ì´ë¤ íê²½ ë³ìë¤ì´ ì ì ëì´ ìëì§ ììë³´ë ¤ë©´ ì¬ë¬ë¶ì ìì ê´í 문ì를 ì´í´ ë³´ëë¡ íë¼. + </simpara> + <simpara> + CGI ë³ì를 í¬í¨í ë¤ë¥¸ íê²½ë³ìë¤ì PHPê° CGIë¡ ëìíê±°ë 모ëë¡ ëìíê±´ ê°ì + ì¬ì©í ì ìë¤. + </simpara> + </sect2> + <sect2 id="language.variables.predefined.php"> + <title>PHP ë³ì</title> + <simpara> + ì´ ë³ìë¤ì PHP ìì ì´ ë§ëë ê²ì´ë¤. + + <varname>$HTTP_*_VARS</varname> ë³ìë¤ì + <link linkend="ini.track-vars">track_vars</link> ì¤ì ì´ + ì¼ì ¸ ìë ê²½ì°ìë§ ì¬ì©ì´ ê°ë¥íë¤. + </simpara> + <note> + <para> + PHP 4.0.3ìì <link linkend="ini.track-vars">track_vars</link>ë ì¤ì íì¼ì ì¤ì ê³¼ ê´ê³ìì´ íì ì¼ì ¸ ìë¤. + </para> + </note> + <para> + ë§ì½ <link linkend="ini.register-globals">register_globals</link> ì§ììê° ì¤ì ëì´ ìì¼ë©´, + ì´ ë³ìë¤ì ì¤í¬ë¦½í¸ì ì ì ìììì ì ê·¼ ê°ë¥í ë³ìë¡ ë§ë¤ì´ ì§ë¤. + (<varname>$HTTP_*_VARS</varname> ë°°ì´ ë³ììë ë³ëë¡ ìì±ëë¤.) + ì´ ì¤ì ì ë§¤ì° ì¡°ì¬í´ì ì¬ì©í´ì¼ íê³ , ê°ë¥íë©´ ì´ ì¤ì ì 꺼 ëê³ + <varname>$HTTP_*_VARS</varname> ë³ì를 ì¬ì©íë ê²ì´ ìì íë¤. + ì ìì ì¸ ìë를 ê°ì§ ì¬ì©ìê° ì¬ì©ì ì ë ¥ì ì¬ì©í´ì ìë ìë + ì ì ë³ìì ë´ì©ì ë®ì´ ì¨ ë²ë¦´ ì ìë¤. + ë§ì½ <link linkend="ini.register-globals">register_globals</link>ì¤ì ì ë ì ìë ìí©ì´ë¼ë©´, + ì¬ë¬ë¶ì´ í´ë¹ ë³ì를 ì¬ì©íë ê° ì¤í ë§ë¤ ê·¸ ë³ìê° ìì í ê²ì¸ì§ë¥¼ ë°ëì íì¸íë ì ì°¨ê° ìì´ì¼ íë¤. + </para> + <para> + <variablelist> + <varlistentry> + <term>argv</term> + <listitem> + <simpara> + ì¤í¬ë¦½í¸ì ì ë¬ë ìê·ë¨¼í¸(argument)ì ë°°ì´. + ì¤í¬ë¦½í¸ê° 커맨ëë¼ì¸ ìì ì¤íëìë¤ë©´, 커맨ëë¼ì¸ì íë¼ë©í°ë¤ì + C ííë¡ ì ê·¼í ì ìê² í´ ì¤ë¤. ë§ì½ GET ë°©ìì¼ë¡ í¸ì¶ë ê²½ì°ë¼ë©´, + ì´ ë°°ì´ì 쿼리 문ìì´ì ë´ì©ì ë´ê³ ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>argc</term> + <listitem> + <simpara> + ì¤í¬ë¦½í¸ë¡ ëì´ì¨ 커맨ëë¼ì¸ íë¼ë©í°ì ê°ì. (커맨ëë¼ì¸ ííë¡ í¸ì¶í ê²½ì°) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>PHP_SELF</term> + <listitem> + <simpara> + document root를 기ì¤ì¼ë¡ í íì¬ ì¤íì¤ì¸ ì¤í¬ë¦½í¸ì íì¼ ì´ë¦. + PHP를 커맨ëë¼ì¸ì¼ë¡ ìíí ê²½ì° ì´ ë³ìë ì¬ì©í ì ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_COOKIE_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP ì¿ í¤ë¥¼ ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_GET_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP GET ë©ìë를 ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_POST_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP POST ë©ìë를 ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_POST_FILES</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP POST ë©ìë를 ì¬ì©í´ ì ë¡ëë íì¼ì ëí ì 보를 ê°ì§ associative ë°°ì´ + <varname>$HTTP_POST_FILES</varname> ë°°ì´ì ë´ì©ì ëí ìì¸í ì ë³´ë + <link linkend="features.file-upload.post-method">POST method uploads</link> ë¶ë¶ì ì´í´ë³´ì. + </simpara> + <para> + <varname>$HTTP_POST_FILES</varname> ë³ìë 4.0.0 ì´íììë§ ì í¨íë¤. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ENV_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì íì¬ íê²½ ë³ììì ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_SERVER_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP ìë²ìì ì ë¬ë ë³ìì associative ë°°ì´ + ì´ ë³ìë¤ì ììì ì¸ê¸í Apache ë³ìë¤ê³¼ ì ì¬í ë´ì©ì¼ë¡ ëì´ìë¤. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect2> + </sect1> + <sect1 id="language.variables.scope"> + <title>ë³ì ì¬ì© ë²ì (Variable Scope)</title> + <simpara> ë³ìê° ì¬ì©ê°ë¥í ê³³ì ê·¸ ë³ìê° ì ì¸ë ê³³ ììì ë§ì´ë¤. PHP ë³ìì ëë¶ë¶ì í ê°ì ë²ì(single scope)ë§ì ê°ì§ê³ ìë¤. ì´ ë²ìë includeë requireëì´ì ì½íì¨ íì¼ìë ëì¼íê² ì ì©ëë¤. ì를ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; include "b.inc"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ììì <varname>$a</varname>ë³ìë <filename>b.inc</filename> ì¤í¬ë¦½í¸ììë ì¬ì©í ì ìë¤. 기본ì ì¼ë¡ í¨ì ììì ì ì¸ë ê²ì í¨ì ìììë§ ì¬ì©ëë ì§ì ë³ìì´ë¤. ëí í¨ì ììì ì¬ì©ëë í¨ìë¤ì 기본ì ì¼ë¡ ì§ì ë³ìë¼ê³ ê°ì íê³ ì°¾ê² ëë¤. ì를 ë¤ì´: - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; /* global scope */ Function Test () { @@ -222,12 +481,16 @@ } Test (); - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì´ ì¤í¬ë¦½í¸ë í¨ì ìì <varname>$a</varname> ë³ì를 ì§ìë³ìë¡ ê°ì íìê³ , ì§ìë³ì $aìë ì무 ê°ë ëì ëì§ ìì기 ë문ì ìë¬´ë° ì¶ë ¥ë ëíëì§ ìëë¤. ì´ê²ì Cìë ì½ê° ì°¨ì´ê° ëë ë¶ë¶ì´ë¤. PHPìì ì ìë³ì를 ì¬ì©íë ¤ë©´ ì¬ì©íê³ ì¶ì ì ì ë³ì를 í¨ì ìì global ì ì¸ì í´ ì£¼ì´ì¼ íë¤. ì를 ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; $b = 2; @@ -239,15 +502,20 @@ Sum (); echo $b; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ìì ì¤í¬ë¦½í¸ë "3"ì ì¶ë ¥í ê²ì´ë¤. í¨ì ë´ìì <varname>$a</varname>ì <varname>$b</varname>를 globalë¡ ì ì¸íì¼ë¯ë¡, ì´ í¨ìë´ì $a, $bë ì ì ë³ì를 참조íê² ëë¤. í¨ì ë´ìì ë¤ë£° ì ìë ì ìë³ìì ê°ììë ì íì´ ìë¤. - </simpara> <simpara> + </simpara> + <simpara> ì ì ë³ì를 참조íë ë ë²ì§¸ ë°©ë²ì PHPìì í¹ë³í ì ìíê³ ìë $GLOBALSë¼ë ë°°ì´ì ì¬ì©íë ê²ì´ë¤. ìì ì를 ë¤ìê³¼ ê°ì´ ë°ê¿ ì¸ ì ìë¤. : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; $b = 2; @@ -257,42 +525,57 @@ Sum (); echo $b; - </programlisting> </informalexample> <simpara> <varname>$GLOBALS</varname> ë°°ì´ì ë³ìì´ë¦ì´ Keyê° ëê³ , + </programlisting> + </informalexample> + <simpara> + <varname>$GLOBALS</varname> ë°°ì´ì ë³ìì´ë¦ì´ Keyê° ëê³ , ê·¸ ë³ìì ë´ì©ì´ ê°ì´ ëë ìì를 ê°ì§ associative ë°°ì´ì´ë¤. - </simpara> <simpara> - ë³ì ë²ìì ê´ë ¨íì¬ ììëì´ì¼ í ë ë¤ë¥¸ ë´ì©ì¼ë¡ <emphasis>ì ì </emphasis> ë³ì(static variable)ê° ìë¤ë¤. - ì ì ë³ìë ì§ì í¨ì ë´ììë§ ì¡´ì¬íì§ë§ ì§ì í¨ìê° ì¢ ë£ëì´ë ê·¸ ê°ì ì½ì´ë²ë¦¬ì§ ìê³ ê°ì§ê³ ìë¤. ë¤ì ì를 ë³´ì : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <simpara> + ë³ì ë²ìì ê´ë ¨íì¬ ììëì´ì¼ í ë ë¤ë¥¸ ë´ì©ì¼ë¡ + <emphasis>ì ì </emphasis> ë³ì(static variable)ê° ìë¤ë¤. + ì ì ë³ìë ì§ì í¨ì ë´ììë§ ì¡´ì¬íì§ë§ ì§ì í¨ìê° ì¢ ë£ëì´ë + ê·¸ ê°ì ì½ì´ë²ë¦¬ì§ ìê³ ê°ì§ê³ ìë¤. ë¤ì ì를 ë³´ì : + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { $a = 0; echo $a; $a++; } - </programlisting> </informalexample> <simpara> - This function is quite useless since every time it is called it - sets <varname>$a</varname> to <literal>0</literal> and prints - "0". The <varname>$a</varname>++ which increments the - variable serves no purpose since as soon as the function exits the - <varname>$a</varname> variable disappears. To make a useful - counting function which will not lose track of the current count, - the <varname>$a</varname> variable is declared static: - </simpara> <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + <simpara> + ì´ í¨ìë ì´ í¨ìê° í¸ì¶ë ëë§ë¤ <varname>$a</varname>를 <literal>0</literal>ì¼ë¡ ì¤ì íê³ + "0"ì ì¶ë ¥íë¤. ì´ í¨ìê° ì¢ ë£ëë ìì ìì <varname>$a</varname> ë³ìê° ì¬ë¼ì§ë¯ë¡ + ì¦ê° ì°ì°ì¸ <varname>$a</varname>++ë 무ì미í ëª ë ¹ì´ ëë¤. + íì¬ì ì를 ìì§ ìê³ ê³ì ì¸ì´ëê°ë ì¹´ì´í í¨ì를 ë§ë¤ê¸° ìí´ìë + ë¤ìê³¼ ê°ì´ <varname>$a</varname> ë³ì를 ì ì ì¼ë¡ ì ì¸í´ì¼ íë¤. + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { static $a = 0; echo $a; $a++; } - </programlisting> </informalexample> <simpara> - Now, every time the Test() function is called it will print the - value of <varname>$a</varname> and increment it. - </simpara> <simpara> + </programlisting> + </informalexample> + <simpara> + ì´ì Test() í¨ìê° í¸ì¶ë ë ë§ë¤ <varname>$a</varname>ì ê°ì + ì¶ë ¥íê³ ê·¸ ê°ì íë ì¦ê° ìí¨ë¤. + </simpara> + <simpara> ëí ì ì ë³ìë ë¤ìê³¼ ê°ì´ recursionìì ë°ëì íìíë¤. ì¬ê·ì ì¸ í¨ìë ì기 ìì ì í¨ì를 í¸ì¶íë ê²ì ë§íë¤. ì¬ê·ì ì¸ í¨ì를 ì¬ì©í ëë 무í 루íì ë¹ ì§ ì ì기 ë문ì ë§¤ì° ì£¼ì를 ìíë¤. ë°ë¼ì ì¬ë¬ë¶ì ì¬ê· í¸ì¶ì ëë´ë ì ì í ë°©ë²ì ë§ë ¨í´ ëì´ì¼ íë¤. ë¤ìì ê°ë¨í ìì ë 10ë²ì ì¬ê·ì í¸ì¶ì íë¤. ì ì ë³ì <varname>$count</varname>를 ì¬ì©íì¬ ì¤ë¨ë ì기를 ì ì ìë¤. - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { static $count = 0; @@ -303,28 +586,52 @@ } $count--; } - </programlisting> </informalexample> </sect1> <sect1 id="language.variables.variable"> <title>ê°ë³ ë³ì (Variable variables)</title> <simpara> + </programlisting> + </informalexample> + </sect1> + <sect1 id="language.variables.variable"> + <title>ê°ë³ ë³ì (Variable variables)</title> + <simpara> ê°ë ë³ìì ì´ë¦ì ë³ê²½í ì ìë¤ë©´ í¸ë¦¬íë¤ê³ ëë ëê° ìë¤. ì´ì ë³ìì ì´ë¦ì ë°ê¾¸ì´ ì¬ì©íë ë°©ë²ì ììë³´ì. ë³´íµì ë³ì ì ì¸ì ë¤ìê³¼ ê°ë¤.: - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = "hello"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ê°ë³ ë³ìì ë³ìì ê°ì ê°ì§ ìë ìê³ , ëí ì´ ê°ì ë³ìì ì´ë¦ì¼ë¡ ë¤ë£° ìë ìë¤. ìì ììì $$를 ì¬ì©íë©´ <emphasis>hello</emphasis>ê° ë³ì ì´ë¦ì´ ë ì ìë¤. ì : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $$a = "world"; - </programlisting> </informalexample> <simpara> - ì´ë ê² íë©´ PHPì symbol treeìë "hello"ë¼ë ê°ì ê°ì§ë <varname>$a</varname>ì "world"ë¼ë ê°ì ê°ì§ë - <varname>$hello</varname>ì ë ê°ì ë³ìê° ìê¸°ê² ëë¤. ê·¸ë¬ë¯ë¡ ë¤ìê³¼ ê°ì 문ì¥ì : - </simpara> <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + <simpara> + ì´ë ê² íë©´ PHPì symbol treeìë "hello"ë¼ë ê°ì ê°ì§ë + <varname>$a</varname>ì "world"ë¼ë ê°ì ê°ì§ë + <varname>$hello</varname>ì ë ê°ì ë³ìê° ìê¸°ê² ëë¤. + ê·¸ë¬ë¯ë¡ ë¤ìê³¼ ê°ì 문ì¥ì : + </simpara> + <informalexample> + <programlisting role="php"> echo "$a ${$a}"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ë¤ì 문ì¥ê³¼ ë ê°ì ì¶ë ¥ì ëíë´ê² ëë¤.: - </simpara> <informalexample> <programlisting> + </simpara> + <informalexample> + <programlisting> echo "$a $hello"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> i.e. ëì ì¶ë ¥: <computeroutput>hello world</computeroutput>. - </simpara> <simpara> + </simpara> + <simpara> ê°ë³ ë³ì를 ë°°ì´ê³¼ í¨ê» ì¬ì©íë ¤ë©´, íê°ì§ 모í¸ì± 문ì 를 í´ê²°í´ì¼ íë¤. ê·¸ê²ì, ë§ì½ ì¬ë¬ë¶ì´ <varname>$$a[1]</varname>ì´ë¼ê³ ì¼ì¼ë©´, <varname>$a[1]</varname>ì íëì ë³ìë¡ ë³¼ ê²ì¸ì§, @@ -332,32 +639,48 @@ ë¤ìê³¼ ê°ì´ íì¬ ëª¨í¸ì±ì í´ê²°íì. ì ìì ê²½ì° <varname>${$a[1]}</varname>ë¼ê³ ì°ê³ , íìì ê²½ì°ë <varname>${$a}[1]</varname>ë¼ê³ ì°ë©´ ëë¤. ( ìì주: ê°ë³ ë³ì를 ëíë¼ ëë íì { }ë¡ ëë¬ ì¸ë ê²ì´ 보기 ì¢ê³ ì¤ë¥ë ìì¨ ì ìë¤.) - </simpara> </sect1> <sect1 id="language.variables.external"> <title>PHP ë°ìì ì¨ ë³ìë¤ (Variables from outside PHP)</title> <sect2 id="language.variables.external.form"> <title>HTML Forms (GET and POST)</title> <simpara> + </simpara> + </sect1> + <sect1 id="language.variables.external"> + <title>PHP ë°ìì ì¨ ë³ìë¤ (Variables from outside PHP)</title> + <sect2 id="language.variables.external.form"> + <title>HTML Forms (GET and POST)</title> + <simpara> í¼ì´ PHP ì¤í¬ë¦½í¸ë¡ submitëë©´ í¼ì ìë 모ë ë´ì©ë¤ì´ ìëì ì¼ë¡ ë§ë¤ì´ì§ PHP ë³ìë¡ ë¤ì´ì¨ë¤. ë§ì½ <link linkend="ini.track-vars">track_vars</link> ìµì ì´ onì¼ë¡ ì¤ì ëì´ ìì¼ë©´, ì´ ë³ìë¤ ëª¨ëë ê·¸ê²ì´ ì´ëì ë§ë¤ì´ì§ ê²ì´ëì ë°ë¼ì <varname>$HTTP_POST_VARS</varname>, - <varname>$HTTP_GET_VARS</varname>, <varname>$HTTP_POST_FILES</varname>ì associative ë°°ì´ì ìì¹íê² ëë¤. - </simpara> <para> + <varname>$HTTP_GET_VARS</varname>, + <varname>$HTTP_POST_FILES</varname>ì associative ë°°ì´ì ìì¹íê² ëë¤. + </simpara> + <para> ì´ ë³ììëí ìì¸í ì¤ëª ì <link linkend="language.variables.predefined">미리 ì ìë ë³ì (Predefined variables)</link>ì ì½ì´ë³´ê¸° ë°ëë¤. - </para> <para> <example> <title>Simple form variable</title> <programlisting role="php"> + </para> + <para> + <example> + <title>Simple form variable</title> + <programlisting role="php"> <form action="foo.php" method="post"> Name: <input type="text" name="username"><br> <input type="submit"> </form> - </programlisting> </example> </para> <para> - - When the above form is submitted, the value from the text input - will be available in - <varname>$HTTP_POST_VARS['username']</varname>. If the <link linkend="ini.register-globals">register_globals</link> - configuration directive is turned on, then the variable will also - be available as <varname>$username</varname> in the global scope. - </para> <simpara> - PHP also understands arrays in the context of form variables. You - may, for example, group related variables together, or use this - feature to retrieve values from a multiple select - input: - </simpara> <para> <example> <title>More complex form variables</title> <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + ìì í¼ì´ ì ì¡ë ë, text inputì ë´ì©ì <varname>$HTTP_POST_VARS['username']</varname>ì ìë¤. + ë§ì½ <link linkend="ini.register-globals">register_globals</link> ì§ììê° ì¼ì ¸ ìì¼ë©´, + ì¤í¬ë¦½í¸ì ì ì ìììì <varname>$username</varname>ì´ë¼ë ë³ììë ì´ ê°ì´ ì ì¥ëë¤. + </para> + <simpara> + PHPë í¼ ë³ìì ë°°ì´ì ì¬ì©í ìë ìë¤. + ì를ë¤ì´, ë´ì©ì ì¼ë¡ 묶ì ì ìë ë³ìë¤ì íëì ë°°ì´ë¡ 묶ì ì ìê³ , + ì´ ê¸°ë¥ì select 문ì ì¬ì©íì¬ ë¤ì¤ ì íì 구íí ì ìë¤. + </simpara> + <para> + <example> + <title>More complex form variables</title> + <programlisting role="php"> <form action="array.php" method="post"> Name: <input type="text" name="personal[name]"><br> Email: <input type="text" name="personal[email]"><br> @@ -369,19 +692,34 @@ </select> <input type="submit"> </form> - </programlisting> </example> </para> <para> - In PHP 3, the array form variable usage is limited to - single-dimensional arrays. In PHP 4, no such restriction applies. - </para> <sect3 id="language.variables.external.form.submit"> <title>IMAGE SUBMITì ë³ì ì´ë¦</title> <simpara> + </programlisting> + </example> + </para> + <para> + PHP3ìì í¼ ë°°ì´ì ì¬ì©ëë ë°°ì´ì ì¼ì°¨ì ë°°ì´ë¡ ì íëìì§ë§, + PHP4ììë ì´ ì íì´ ìì´ì¡ë¤. + </para> + <sect3 id="language.variables.external.form.submit"> + <title>IMAGE SUBMITì ë³ì ì´ë¦</title> + <simpara> í¼ì submití ë ì¼ë°ì ì¼ë¡ ì¬ì©íë submit ë²í¼ ëì ë¤ìê³¼ ê°ì´ 그림ì ì¬ì©í ìë ìë¤. : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> <input type=image src="image.gif" name="sub"> - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì¬ì©ìê° image를 í´ë¦íë©´, í¼ì sub_xì sub_yì ë ê°ì ë³ìê° ì¶ê°ëì´ ìë²ì ì ì¡ëë¤. ì´ ë ë³ìë ì´ë¯¸ì§ìì ì¬ì©ìê° clickí ìì¹ ì 보를 ë´ê³ ìë¤. ì¼ë¶ ë¸ë¼ì°ì ììë ë°ì¤(_)ëì ë§ì¹¨í(.)를 ì¬ì©íë ê²½ì°ë ìëë°, PHPë ì´ë° ê²½ì° ìëì ì ë§ì¹¨í(.)를 ë°ì¤(_)ë¡ ë°ê¿ì¤ë¤. - </simpara> </sect3> </sect2> <sect2 id="language.variables.external.cookies"> <title>HTTP Cookies</title> <simpara> + </simpara> + </sect3> + </sect2> + <sect2 id="language.variables.external.cookies"> + <title>HTTP Cookies</title> + <simpara> PHPë HTTP ì¿ í¤ë¥¼ <ulink url="&spec.cookies;">Netscape's Spec</ulink>ì ì ìì ë°ë¼ ì ê³µíë¤. Cookie ë©ì¹´ëì¦ì í¸ëí¹ì´ë ì¬ì©ì ìë³ ë±ì ìí´ ì격 browserì ì ì¥ë ë°ì´í°ë¥¼ ëë ¤ ë°ë ê³¼ì ì ë§íë¤. ì¬ë¬ë¶ì cookie를 ì¤ì í기 ìí´ <function>SetCookie</function>í¨ì를 ì¬ì©í ì ìë¤. @@ -389,31 +727,52 @@ í¨ìë ë¸ë¼ì°ì ë¡ ë³´ë´ë ì´ë¤ ë°ì´í°ë³´ë¤ë ìì ì¬ì©í´ì¼ íë¤. ì´ ì ì½ì <function>Header</function> í¨ìì ê°ì ì ì½ì¼ë¡ ë³´ë©´ ëë¤. ë³´ë¸ ëª¨ë cookieë ìëì ì¼ë¡ GETì´ë POST ë°©ì ë°ì´í°ì ê°ì PHP ë³ìë¡ ë³íëë¤. - </simpara> <simpara> + </simpara> + <simpara> ë§ì½ ì¬ë¬ë¶ì´ ëì¼í cookieì ì¬ë¬ ê°ì ì ì¥íê³ ì¶ë¤ë©´ Cookieì´ë¦ì <emphasis>[]</emphasis>를 ëíë©´ ëë¤. ì를 ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> SetCookie ("MyCookie[]", "Testing", time()+3600); - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì¿ í¤ë ìë¡ ì¤ì íë©´ pathë ëë©ì¸ì´ ë¤ë¥´ì§ ìë í ì´ì ì ì¿ í¤ë¥¼ ë®ì´ì°ê² ëë¤. ê·¸ë¬ë¯ë¡ ì¼í ì¹´í¸ ê°ì ìì© íë¡ê·¸ë¨ììë ë¤ìê³¼ ê°ì´ ì¹´ì´í°ë¥¼ ì¬ì©íì¬, ì´ê²ì 기ì¤ì¼ë¡ Cookie를 ì¬ì©íë ê²ì´ ì¢ë¤. ì : - </simpara> <example> <title>SetCookie Example</title> <programlisting role="php"> + </simpara> + <example> + <title>SetCookie Example</title> + <programlisting role="php"> $Count++; SetCookie ("Count", $Count, time()+3600); SetCookie ("Cart[$Count]", $item, time()+3600); - </programlisting> </example> </sect2> <sect2 id="language.variables.external.environment"> <title>íê²½ ë³ì (Environment variables)</title> <para> + </programlisting> + </example> + </sect2> + <sect2 id="language.variables.external.environment"> + <title>íê²½ ë³ì (Environment variables)</title> + <para> PHPë ìëì ì¼ë¡ íê²½ ë³ìë¤ì ì¼ë°ì ì¸ PHP ë³ìë¡ ë§ë ë¤. - <informalexample> <programlisting role="php"> + <informalexample> + <programlisting role="php"> echo $HOME; /* Shows the HOME environment variable, if set. */ - </programlisting> </informalexample> </para> <para> + </programlisting> + </informalexample> + </para> + <para> GET, POST, Cookie ë©ì¹´ëì¦ì íµí´ì ë¤ì´ ì¨ ì ë³´ë¡ë¶í°ë PHP ë³ìê° ì기ë¯ë¡, ëëë¡ íê²½ë³ìë¡ë¶í° ë°ìê²ì´ íì¤íê°ë¥¼ íì¸í íìê° ìì ëë ìë¤. ì´ë¥¼ ìí´ <function>getenv</function> í¨ì를 ì¬ì©íë¤. íê²½ ë³ì를 ì¤ì í기 ìí´ìë <function>putenv</function> í¨ì를 ì¬ì©íë¤. - </para> </sect2> <sect2 id="language.variables.external.dot-in-names"> <title>ì¸ë¶ ë³ìëª ì ìë '.' (Dots in incoming variable names)</title> <para> + </para> + </sect2> + <sect2 id="language.variables.external.dot-in-names"> + <title>ì¸ë¶ ë³ìëª ì ìë '.' (Dots in incoming variable names)</title> + <para> ì¼ë°ì ì¼ë¡ PHPë ë³ì를 ì¤í¬ë¦½í¸ë¡ ê°ì ¸ì¬ ë ë³ìëª ì ë°ê¾¸ì§ ìëë¤. ê·¸ë¬ë, PHPì ë³ìëª ìë '.' (ì )ì ì¬ì©í ì ìë¤. ë¤ìê³¼ ê°ì ê²½ì°ë¥¼ ë³´ì. : <programlisting role="php"> @@ -422,16 +781,25 @@ ìì ê²½ì° PHP íìë <varname>$varname</varname>ì´ë¼ë ë³ìì, ì°ê²° ì°ì°ì, 'ext'(ë°ì´íê° ìë ê²½ì° ê·¸ê²ì´ ì´ë¤ ìë ¤ì§ í¤ë ìì½ì´ê° ìëë©´ 문ìì´ë¡ ì·¨ê¸ëë¤.)ë¡ í´ìíë¤. ì´ê²ì ì°ë¦¬ê° ìíë ê²°ê³¼ê° ìëë¤. - </para> <para> + </para> + <para> ìì ê°ì ì´ì ë¡ PHPë ì¸ë¶ìì ë¶ë¬ë¤ì¸ ë³ìì ì´ë¦ì '.'ì´ ìì¼ë©´ '_'(ë°ì¤)ë¡ ë°ê¾¸ì´ ì½ì´ë¤ì¸ë¤. - </para> </sect2> <sect2 id="language.variables.determining-type-of"> <title>ë³ìì Type íë¨ (Determining variable types)</title> <para> + </para> + </sect2> + <sect2 id="language.variables.determining-type-of"> + <title>ë³ìì Type íë¨ (Determining variable types)</title> + <para> PHPë ë³ìì typeì ììì ì íê³ (ì¼ë°ì ì¼ë¡) íìí ê²½ì°ìë ê·¸ typeì ë°ê¾¸ë¯ë¡, í¹ì ìì ì ê·¸ ë³ì ì´ë¤ typeì¸ì§ë ì½ê² ì ì ìë¤. PHPë ë³ìì typeì ìì보기 ìí´ ì¬ë¬ê°ì í¨ì를 ê°ì§ê³ ìë¤. <function>gettype</function>, <function>is_long</function>, <function>is_double</function>, <function>is_string</function>, <function>is_array</function>, <function>is_object</function> ê° ê·¸ê²ë¤ì´ë¤. - </para> </sect2> </sect1></chapter><!-- Keep this comment at the end of the file + </para> + </sect2> + </sect1> +</chapter> +<!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t @@ -446,4 +814,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: - -->ÿ \ No newline at end of file + -->
Index: phpdoc/kr/chapters/config.xml diff -u phpdoc/kr/chapters/config.xml:1.1 phpdoc/kr/chapters/config.xml:1.2 --- phpdoc/kr/chapters/config.xml:1.1 Mon Jan 8 02:18:54 2001 +++ phpdoc/kr/chapters/config.xml Thu Feb 8 01:26:02 2001 @@ -123,7 +123,7 @@ í¸ì¶ë íì¼ì <function>include</function> í¨ì를 íµí´ì í¬í¨ëë¯ë¡ <link linkend="ini.include-path">include_path</link> ì§ììê° ì ì©ëë¤.</para> <para> - <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-appendingì´ disableëë¤. + <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-appendingì´ disableëë¤. <note> <simpara> ë§ì½ ì¤í¬ë¦½í¸ê° <function>exit</function>ë¡ ì¢ ë£ëê² ëë©´ auto-appendë ì¼ì´ëì§ ìëë¤. </simpara> @@ -142,7 +142,7 @@ í¸ì¶ë íì¼ì <function>include</function> í¨ì를 íµí´ì í¬í¨ëë¯ë¡ <link linkend="ini.include-path">include_path</link> ì§ììê° ì ì©ëë¤.</para> <para> - <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-prependingì´ disableëë¤.</para> + <systemitem class="constant">none</systemitem> ê°ì ì£¼ê² ëë©´ auto-prependingì´ disableëë¤.</para> </listitem> </varlistentry> <varlistentry id="ini.cgi-ext"> @@ -262,7 +262,7 @@ ë°ë¼ì ì´ ì íì í¼í기 ìí´ symbolic link를 ì¬ì©íë ê²ì ë°©ì§í ì ìë¤. </para> <para> - <systemitem class="constant">.</systemitem>.ì´ë¼ë ê°ì 주면 ì¤í¬ë¦½í¸ íì¼ì´ ìë ëë í ë¦¬ê° base-directoryë¡ ì§ì ëë¤. + <systemitem class="constant">.</systemitem>.ì´ë¼ë ê°ì 주면 ì¤í¬ë¦½í¸ íì¼ì´ ìë ëë í ë¦¬ê° base-directoryë¡ ì§ì ëë¤. </para> <para> Windowsììë ì¸ë¯¸ì½ë¡ (;)ì¼ë¡, ë¤ë¥¸ OSììë ì½ë¡ (:)ì¼ë¡ 구ë¶íë¤. @@ -310,7 +310,7 @@ </term> <listitem> <para> - <function>require</function>ì <function>include</function>, <function>fopen_with_path</function> + <function>require</function>ì <function>include</function>, <function>fopen_with_path</function> í¨ìë¤ì´ ì¬ì©íë íì¼ì ì°¾ì ìì¹(path)를 ì§ì íë¤. stringì íìì ìì¤í íê²½ë³ì <envar>PATH</envar>ì ì¤ì ê³¼ ë¹ì·íë¤. UNIXììë ì½ë¡ ì¼ë¡ ëëì´ì§ ëë í 리ë¤ì 리ì¤í¸ì´ê³ , Windowsììë ì¸ë¯¸ì½ë¡ ì ì¬ì©íë¤. @@ -433,18 +433,19 @@ </term> <listitem> <para> - Tells whether or not to register the EGPCS (Environment, GET, - POST, Cookie, Server) variables as global variables. You may - want to turn this off if you don't want to clutter your - scripts' global scope with user data. This makes the most - sense when coupled with <link linkend="ini.track-vars">track_vars</link> - in which case - you can access all of the EGPCS variables through the + EGPCS (Environment, GET, POST, Cookie, Server) ë³ìë¤ì ì ì ë³ìë¡ ì¤ì í ê²ì¸ê°ë¥¼ ì íë¤. + ì¬ì©ìì ë°ì´í를 ì¤í¬ë¦½í¸ì ì ì ë³ì ììì ëì¡íê² ììë기를 ìíì§ ìëë¤ë©´ + ì´ ì¤ì ì 꺼ëë ê²ì´ ì¢ë¤. + ì´ ì¤ì ì <link linkend="ini.track-vars">track_vars</link> ì¤ì 를 + ê³ ë ¤í´ì ì¬ì©íë©´ ë§¤ì° ì ì©íê² ì¬ì©í ì ìë¤. + <link linkend="ini.track-vars">track_vars</link>ì¤ì ì ì¼ ëì¼ë©´ + ì¬ì©ìì EGPCS ë³ìë¤ì 모ë <varname>$HTTP_ENV_VARS</varname>, <varname>$HTTP_GET_VARS</varname>, <varname>$HTTP_POST_VARS</varname>, - <varname>$HTTP_COOKIE_VARS</varname>, and - <varname>$HTTP_SERVER_VARS</varname> - arrays in the global scope. + <varname>$HTTP_COOKIE_VARS</varname>, + <varname>$HTTP_SERVER_VARS</varname> + ë°°ì´ì íµí´ ì ì ìì(global scope)ìì ì ê·¼ê°ë¥íê² ëë¤. </para> </listitem> </varlistentry> @@ -573,7 +574,7 @@ </term> <listitem> <para> - <command>sendmail</command> íë¡ê·¸ë¨ì ì°¾ì Path. + <command>sendmail</command> íë¡ê·¸ë¨ì ì°¾ì Path. ë³´íµì <filename>/usr/sbin/sendmail</filename>ì´ë <filename>/usr/lib/sendmail</filename>ì ìë¤. <command>configure</command> íë¡ê·¸ë¨ì´ sendmailì ìì¹ë¥¼ ì°¾ì ì´ê²ì 기본ê°ì¼ë¡ ì¤ì í´ ì£¼ì§ë§, ê·¸ê²ì´ ìëì§ ììê±°ë ì¤ë¥ê° ìì ë, ì¬ë¬ë¶ì ì¬ê¸°ì ì§ì ì§ì í´ ì¤ ì ìë¤. </para> @@ -851,10 +852,10 @@ </term> <listitem> <para> - Name of BS2000 PLAM library containing the loadable SESAM - driver modules. Required for using SESAM functions. The - BS2000 PLAM library must be set ACCESS=READ,SHARE=YES - because it must be readable by the apache server's user id. + SESAM ëë¼ì´ë² 모ëì í¬í¨íê³ ìë BS2000 PLAM ë¼ì´ë¸ë¬ë¦¬ì ì´ë¦ + SESAM í¨ì를 ì¬ì©íë ¤ë©´ ê¼ ì§ì í´ ì£¼ì´ì¼ íë¤. + ê·¸ë¦¬ê³ , BS2000 PLAM ë¼ì´ë¸ë¬ë¦¬ë ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìëë¡ + ACCESS=READ,SHARE=YESë¡ ì¤ì í´ì¼ íë¤. </para> </listitem> </varlistentry> @@ -865,14 +866,13 @@ </term> <listitem> <para> - Name of SESAM application configuration file. Required for - using SESAM functions. The BS2000 file must be readable by - the apache server's user id. + SESAM ì´í리ì¼ì´ì ì¤ì íì¼ì ì´ë¦. + SESAM í¨ì를 ì¬ì©íë ¤ë©´ ê¼ ì§ì í´ ì£¼ì´ì¼ íë¤. + BS2000 íì¼ì ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìì´ì¼ íë¤. </para> <para> - The application configuration file will usually contain a - configuration like (see SESAM - reference manual): + SESAM ì´í리ì¼ì´ì ì¤ì íì¼ì ë³´íµ ë¤ìê³¼ ê°ì ë´ì©ì¼ë¡ ì¤ì ëì´ ìë¤. + (SESAM reference manualì ì´í´ë³´ë¼) : <informalexample> <programlisting role="bs2000"> CNF=B @@ -889,14 +889,13 @@ </term> <listitem> <para> - Name of SESAM message catalog file. In most cases, this - directive is not neccessary. Only if the SESAM message file - is not installed in the system's BS2000 message file table, - it can be set with this directive. + SESAM message catalog íì¼ì ì´ë¦. ëë¶ë¶ì ê²½ì° ì´ ì§ììë íì ìë¤. + ë¨ì§ SESAM message íì¼ì´ BS2000 message íì¼ í ì´ë¸ì ì¤ì ëì´ ìì§ ìì ê²½ì°ì + ì´ ì§ìì를 ì¬ì©íì¬ ì¤ì íë¤. </para> <para> - The message catalog must be set ACCESS=READ,SHARE=YES because - it must be readable by the apache server's user id. + message catalogë ìíì¹ ìë²ì ì¬ì©ì IDë¡ ì½ì ì ìëë¡ + ACCESS=READ,SHARE=YESë¡ ì¤ì í´ì¼ íë¤. </para> </listitem> </varlistentry> @@ -1085,7 +1084,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì í¸ì¤í¸ê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 í¸ì¤í¸. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì í¸ì¤í¸ê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 í¸ì¤í¸. </para> </listitem> </varlistentry> @@ -1096,7 +1096,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì user idê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 user id. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì user idê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 user id. </para> </listitem> </varlistentry> @@ -1107,7 +1108,8 @@ </term> <listitem> <para> - <function>ifx_connect</function>ë <function>ifx_pconnect</function> í¨ìì passwordê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 password. + <function>ifx_connect</function>ë <function>ifx_pconnect</function> + í¨ìì passwordê° ì§ì ëì§ ììì ê²½ì° ì¬ì©í 기본 password. </para> </listitem> </varlistentry> @@ -1118,10 +1120,9 @@ </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>. + blob ì¹¼ë¼ì íì¼ìì ë°ííë ¤ íë¤ë©´ true를, + ë©ëª¨ë¦¬ìì ë°ííë ¤ë©´ false를 ì¤ì íë¤. + ì´ ì¤ì ì <function>ifx_blobinfile_mode</function> í¨ì를 ì¬ì©íì¬ ì¤íì¤ì ë³ê²½í ì ìë¤. </para> </listitem> </varlistentry> @@ -1220,7 +1221,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì ODBC data source ê° ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> @@ -1232,7 +1233,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì User nameì´ ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> @@ -1244,7 +1245,7 @@ </term> <listitem> <para> - <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì + <function>odbc_connect</function>ë <function>odbc_pconnect</function>ìì Passwordê° ì§ì ëì§ ììì ë ì¬ì©í ê°ë¥¼ ì§ì íë¤ </para> </listitem> Index: phpdoc/kr/language/variables.xml diff -u phpdoc/kr/language/variables.xml:1.2 phpdoc/kr/language/variables.xml:1.3 --- phpdoc/kr/language/variables.xml:1.2 Mon Jan 29 18:25:41 2001 +++ phpdoc/kr/language/variables.xml Thu Feb 8 01:26:03 2001 @@ -1,22 +1,59 @@ -<!-- edited with XML Spy v3.0.7 (http://www.xmlspy.com) by panda (bra) --><chapter id="language.variables"> <title>ë³ì (Variables)</title> <sect1 id="language.variables.basics"> <title>기본(Basics)</title> <simpara> PHPìì ë³ìë ì´ë¦ìì ë¬ë¬íì($)를 ë¶ì¬ì ì¬ì©íë¤. ëí ë³ìëª ì ìì´ ëì문ìë 구ë¶íë¤. </simpara> <para> ë³ìëª ì PHPë´ì ë¤ë¥¸ ë¼ë²¨ëª ì ì ìíë ê²ê³¼ ëì¼í ê·ì¹ì ì ì© ë°ëë¤. ì í¨í ë³ìëª ì 문ìë í¹ì ì¸ëì¤ì½ì(_)ë¡ ììíì¬ì¼ íê³ , ëë²ì§¸ 문ìë¶í°ë 문ìë ì«ì,ì¸ëì¤ì½ìë±ì ì¬ì©í ì ìê³ ê¸¸ì´ìë ì íì´ ìë¤. ì ê·ìì¼ë¡ íííìë©´ ë¤ìê³¼ ê°ì´ ëíë¼ì ìë¤. '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' - </para> <note> <simpara> - a-z, A-Z ì¬ì´ì ìí벳과 ASCII code 127ë¶í° 255ê¹ì§ë¥¼ ì미íë¤ (0x7f-0xff). - </simpara> </note> <para> <informalexample> <programlisting role="php"> +<chapter id="language.variables"> + <title>ë³ì (Variables)</title> + <sect1 id="language.variables.basics"> + <title>기본(Basics)</title> + <simpara> + PHPìì ë³ìë ë³ìëª ìì ë¬ë¬íì($)를 ë¶ì¬ì ì¬ì©íë¤. + ëí ë³ìëª ì ìì´ ëì문ìë 구ë¶íë¤. + </simpara> + <para> + ë³ìëª ì PHPë´ì ë¤ë¥¸ ë¼ë²¨ëª ì ì ìíë ê²ê³¼ ëì¼í ê·ì¹ì ì ì© ë°ëë¤. + ì í¨í ë³ìëª ì 문ìë í¹ì ë°ì¤(_)ë¡ ììíì¬ì¼ íê³ , + ëë²ì§¸ 문ìë¶í°ë 문ìë ì«ì,ë°ì¤ ë±ì ì¬ì©í ì ìê³ ê¸¸ì´ìë ì íì´ ìë¤. + ì ê·ìì¼ë¡ íííìë©´ ë¤ìê³¼ ê°ì´ ëíë¼ì ìë¤. : + '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' + </para> + <note> + <simpara> + ì¬ê¸°ì 문ìë a-z, A-Z ì¬ì´ì ìí벳과 ASCII ì½ë 127ë¶í° 255ê¹ì§(0x7f-0xff)를 ì미íë¤ + </simpara> + </note> + <para> + <informalexample> + <programlisting role="php"> +$var = "Bob"; $Var = "Joe"; echo "$var, $Var"; $4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ $_4site = 'not yet'; // ì¸ëì¤ì½ìë¡ ììë ë³ìë ì¬ì©í ì ìë¤. $t_e = 'mansikka'; // '_ë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. $var = "Bob"; $Var = "Joe"; -echo "$var, $Var"; // ê²°ê³¼ê°ì "Bob, Joe" +echo "$var, $Var"; // ê²°ê³¼ê°ì "Bob, Joe" -$4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ -$_4site = 'not yet'; // ì¸ëì¤ì½ìë¡ ììë ë³ìë ì¬ì©í ì ìë¤. -$t_e = 'mansikka'; // '_ë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. - </programlisting> </informalexample> </para> <para> PHP 3 ìì ë³ìë íì ê°ì ê°ì§ê³ ìë¤. ì´ë ë¤ìë§í´ì, ííìì ê°ì ë³ìì ì ì©íë©´ ííìì ê²°ê³¼ê°ì´ ë³ìë¡ ë³µì¬ëë¤. ííìì ê°ì ë³ìì ë³µì¬íë¯ë¡ ë³µì¬ëê³ ë íì ííìì ë³íë ë³ìì ëì´ì ìí¥ì ì£¼ì§ ìëë¤ê³ í ì ìë¤. ì´ì ëí ìì¸í ì¤ëª ì <link linkend="language.expressions">ííì(Expressions)</link>ì 참조í기 ë°ëë¤. - </para> <para> PHP 4 ììë ë³ìì ê°ì ì§ì íë ë¤ë¥¸ ë°©ë²ì ì ìíê³ ìë¤: <emphasis>참조(reference)를 ì¬ì©í ê° ì§ì (assign)</emphasis>. ì´ë ìë¡ì´ ë³ìê° ê°ì ë³µì¬íì¬ ê°ì§ê³ ì¤ë ê²ì´ ìëë¼ ìë ê°ì´ ìë ê³³ì ë¨ìí 참조íë ë°©ë²ì´ë¤. ìë ê°ì´ ìë ë³ìì ë³ì¹ì´ ëë¤ë¼ê³ í ìë ìê³ ìë ë³ì를 ê°ë¦¬í¨ë¤ê³ ííí ìë ìê² ë¤. ìë¡ì´ ë³ìê°ì ë³íë ìëë³ìì ê°ì ìí¥ì ì£¼ê³ ë°ëë¡ ìëë³ìì ê°ì´ ë³íì¬ë ìë¡ì´ ë³ìì ìí¥ì 미ì¹ë¤. ê²°ì½ ê°ì ë³µì¬íë ê²ê³¼ë ë¤ë¥¸ ê°ë ì´ë¼ í ì ìë¤. ë°ë¼ì í¬ê¸°ê° í° ë°°ì´ì´ë ê°ì²´ë¥¼ ì§ì í ëë ë°ë³µë¬¸ì ìííëë° ìì´ ìíìëê° ë¹¨ë¼ì¡ë¤. </para> <para> - To assign by reference, simply prepend an ampersand (&) to the - beginning of the variable which is being assigned (the source - variable). For instance, the following code snippet outputs 'My - name is Bob' twice: +$4site = 'not yet'; // ë³ìëª ì´ ì«ìë¡ ììíì¼ë¯ë¡ ê·ì¹ì ìë°°ëë¤ +$_4site = 'not yet'; // ë°ì¤ë¡ ììë ë³ìë ì¬ì©í ì ìë¤. +$täe = 'mansikka'; // 'äë ASCII 228ë²ì§¸ 문ìì´ë¯ë¡ ì í¨íë¤. + </programlisting> + </informalexample> + </para> + <para> + PHP 3 ìì ë³ìë íì ê°ì ê°ì§ê³ ìë¤. + ë¤ìë§í´ì, ííìì ê°ì ë³ìì ì ì©íë©´ ííìì ê²°ê³¼ê°ì´ ë³ìë¡ ë³µì¬ëë¤. + ííìì ê°ì ë³ìì ë³µì¬íë¯ë¡ ë³µì¬ëê³ ë íì ë°ìí ííìì ë³íë ë³ìì ëì´ì ìí¥ì ì£¼ì§ ìëë¤. + ì´ì ëí ìì¸í ì¤ëª ì <link linkend="language.expressions">ííì(Expressions)</link>ì 참조í기 ë°ëë¤. + </para> + <para> + PHP 4 ììë ë³ìì ê°ì ëì íë ë¤ë¥¸ ë°©ë²ì ì ê³µíë¤. : + <emphasis>참조를 ì¬ì©í ê° ëì (assign by reference)</emphasis>. + ì´ë ìë¡ì´ ë³ìê° ê°ì ë³µì¬íì¬ ê°ì§ê³ ì¤ë ê²ì´ ìëë¼ ìë ê°ì´ ìë ê³³ì ë¨ìí 참조íë ë°©ë²ì´ë¤. + ìë ê°ì´ ìë ë³ìì ë³ì¹ì´ ëë¤ë¼ê³ í ìë ìê³ , ìë ë³ì를 ê°ë¦¬í¨ë¤ê³ ííí ìë ìë¤. + ìë¡ì´ ë³ìê°ì ë³íë ìë ë³ìì ê°ì ìí¥ì ì£¼ê³ , ë°ëë¡ ìëë³ìì ê°ì´ ë³íì¬ë ìë¡ì´ ë³ìì ìí¥ì 미ì¹ë¤. + ê°ì ë³µì¬íë ê²ê³¼ë ì í ë¤ë¥¸ ê°ë ì´ë¼ í ì ìë¤. + ë°ë¼ì í¬ê¸°ê° í° ë°°ì´ì´ë ê°ì²´ë¥¼ ì§ì í ëë, ë°ë³µë¬¸ì ìííëë° ìì´ ìíìëê° ë¹¨ë¼ì§ë¤. + </para> + <para> + 참조(reference)를 ì¬ì©í ëì ì íë ¤ë©´, ëì 문ìì ëì íë ¤ë ê°ì ê°ì§ê³ ìë + ë³ì(source ë³ì)ì ìì &를 ë¶ì¬ì£¼ë©´ ëë¤. + ì를ë¤ì´, ë¤ìì ìì ì½ëë 'My name is Bob'ì ëë² ì¶ë ¥íë¤. - <informalexample> <programlisting role="php"> + <informalexample> + <programlisting role="php"> <?php $foo = 'Bob'; // Assign the value 'Bob' to $foo $bar = &$foo; // Reference $foo via $bar. @@ -24,10 +61,14 @@ echo $foo; // $foo is altered too. echo $bar; ?> - </programlisting> </informalexample> </para> <para> - One important thing to note is that only named variables may be - assigned by reference. - <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + </para> + <para> + ì¬ê¸°ì ì¤ìí íê°ì§ë ì´ë¦ì ê°ì§ê³ ìë ë³ìë§ì´ 참조를 ì¬ì©í ëì ì´ ê°ë¥íë¤ë ê²ì´ë¤. + ì¦, í¹ì í ê°ì &를 ì¬ì©í ì ìë¤ë ê²ì´ë¤. + <informalexample> + <programlisting role="php"> <?php $foo = 25; $bar = &$foo; // This is a valid assignment. @@ -39,182 +80,400 @@ $bar = &test(); // Invalid. ?> - </programlisting> </informalexample> </para> </sect1> <sect1 id="language.variables.predefined"> <title>미리 ì ìë ë³ì (Predefined variables)</title> <simpara>PHPë 모ë ì¤í¬ë¦½í¸ì ëí´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤í ë ë ì¬ë¬ê°ì 미리 ì ìë ë³ì를 ì ê³µíë¤. -ì´ ë³ìì¤ ìë²ì ì¢ ë¥ë ë²ì , 기í ë¤ë¥¸ ìì¸ì¼ë¡ ì¸í´ ë¬ë¼ì§ë ê²ë ë§ìë°, ê·¸ë° ë³ìë ì´ê³³ì 문ìí ëì§ ììë¤. -ëí ì´ ë³ìì¤ ë¤ìë PHPê° command-lineì¼ë¡ ëìí ëë ì¬ì©í ì ìë¤. - </simpara> <simpara> + </programlisting> + </informalexample> + </para> + </sect1> + <sect1 id="language.variables.predefined"> + <title>미리 ì ìë ë³ì (Predefined variables)</title> + <simpara> + PHPë 모ë ì¤í¬ë¦½í¸ì ëí´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤í ë ë ì¬ë¬ê°ì 미리 ì ìë ë³ì를 ì ê³µíë¤. + ì´ ë³ìì¤ ìë²ì ì¢ ë¥ë ë²ì , 기í ë¤ë¥¸ ìì¸ì¼ë¡ ì¸í´ ë¬ë¼ì§ë ê²ë ë§ìë°, ê·¸ë° ë³ìë ì´ê³³ì 문ìí ëì§ ììë¤. + ëí ì´ ë³ìì¤ ë¤ìë PHPê° command-lineì¼ë¡ ëìí ëë ì¬ì©í ì ìë¤. + </simpara> + <simpara> ì´ë° ì¬ë¬ ìì¸ì´ ìì§ë§ ì´ê³³ììë ê°ì¥ ì¼ë°ì ì¸ íê²½ì¸ <ulink url="&url.apache;">Apache</ulink> 1.3.6 ìì 모ëë¡ PHP3를 ì¤ì¹í íê²½ììì 미리 ì ìë ë³ì를 ì´í´ë³´ëë¡ íì. - </simpara> <simpara> + </simpara> + <simpara> ì¬ë¬ë¶ì´ ì¬ì©íë ìì¤í ì 모ë 미리 ì ìë ë³ì를 ë³´ë ¤ë©´ <function>phpinfo</function> í¨ì를 ì¬ì©íì. (ì´ í¨ìë ë¤ë¥¸ ì¬ë¬ ì ì©í ì ë³´ë ìë ¤ì¤ë¤.) - </simpara> <note> <simpara> + </simpara> + <note> + <simpara> ì¬ê¸°ëì¨ ëª©ë¡ì ìì íì§ ìë¤. (ìë²½í ìê°ë ìë¤.) ì´ ëª©ë¡ì ë¨ìí ì¬ë¬ë¶ì ì¤í¬ë¦½í¸ìì ì´ë¤ ì¢ ë¥ì 미리 ì ìë ë³ìê° ì¬ì©ë ì ìëê°ì ììì¼ ë¿ì´ë¤. - </simpara> </note> <sect2 id="language.variables.predefined.apache"> <title>Apache variables</title> <simpara> + </simpara> + </note> + <sect2 id="language.variables.predefined.apache"> + <title>Apache variables</title> + <simpara> ì´ ë³ìë <ulink url="&url.apache;">Apache</ulink> ì¹ìë²ë¡ë¶í° ìì±ë ê²ì´ë¤. ë§ì½ ì¬ë¬ë¶ì´ ë¤ë¥¸ ì¹ìë²ë¥¼ ì¬ì©íê³ ìë¤ë©´ ì´ì ëì¼í ë³ìê° ìì±ëë¤ê³ ë³´ì¥í ì ìë¤. ìë§ë ì¼ë¶ë ìì´ì§ê³ , ì¬ê¸°ì ìë ë³ìê° ìë¡ ì길 ê²ì´ë¤. ì¬ê¸°ì ìë ë³ìì¤ ëë¶ë¶ì <ulink url="&url.cgispec;">CGI 1.1 specification</ulink>ìì ëì¨ ê²ì´ê³ , ê·¸ ë´ì©ëë¡ ì¬ì©ëë¤. - </simpara> <simpara> + </simpara> + <simpara> ì´ê³³ì ìë ë³ìì¤ PHPê° command lineì¼ë¡ ëìí ê²½ì° ì¬ì©ë ì ìë ê²ì ê±°ì ìë¤. - </simpara> <para> <variablelist> <varlistentry> <term>GATEWAY_INTERFACE</term> <listitem> <simpara> + </simpara> + <para> + <variablelist> + <varlistentry> + <term>GATEWAY_INTERFACE</term> + <listitem> + <simpara> ìë²ê° ì¬ì©íê³ ìë CGI specificationì revision. ì: 'CGI/1.1'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_NAME</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_NAME</term> + <listitem> + <simpara> íì¬ ì¤í¬ë¦½í¸ê° ì¤íëê³ ìë í¸ì¤í¸ì ì´ë¦. ë§ì½ ì¤í¬ë¦½í¸ê° ê°ì í¸ì¤í¸ìì ì¤íëê³ ìë¤ë©´, ì´ ê°ì ê°ì í¸ì¤í¸ì ê°ì´ ë ê²ì´ë¤. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_SOFTWARE</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_SOFTWARE</term> + <listitem> + <simpara> ì구ì ëí ëëµì í¤ëì ì¬ì©í ìë² identification 문ìì´ - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_PROTOCOL</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_PROTOCOL</term> + <listitem> + <simpara> íì´ì§ê° ì구ëì´ì§ ë ì¬ì©í íë¡í ì½ì ì´ë¦ê³¼ 리ë¹ì ¼. ì: 'HTTP/1.0'; - </simpara> </listitem> </varlistentry> <varlistentry> <term>REQUEST_METHOD</term> <listitem> <simpara> - Which request method was used to access the page; i.e. 'GET', - 'HEAD', 'POST', 'PUT'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>QUERY_STRING</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REQUEST_METHOD</term> + <listitem> + <simpara> + íì´ì§ê° ì구ë ë ì¬ì©ë method: ì: 'GET', 'HEAD', 'POST', 'PUT'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>QUERY_STRING</term> + <listitem> + <simpara> í´ë¹ íì´ì§ë¥¼ ì ê·¼í ë ì¬ì©ë query string. - </simpara> </listitem> </varlistentry> <varlistentry> <term>DOCUMENT_ROOT</term> <listitem> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>DOCUMENT_ROOT</term> + <listitem> + <simpara> íì¬ ì¤í¬ë¦½í¸ê° ìíì¤ì¸ document root ëë í 리. ìë²ì ì¤ì íì¼ì ì ìëì´ ìë¤. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT</term> <listitem> <simpara> - Contents of the <literal>Accept:</literal> header from the - current request, if there is one. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT_CHARSET</term> <listitem> <simpara> - Contents of the <literal>Accept-Charset:</literal> header - from the current request, if there is one. Example: - 'iso-8859-1,*,utf-8'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ENCODING</term> <listitem> <simpara> - Contents of the <literal>Accept-Encoding:</literal> header - from the current request, if there is one. Example: 'gzip'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_ACCEPT_LANGUAGE</term> <listitem> <simpara> - Contents of the <literal>Accept-Language:</literal> header - from the current request, if there is one. Example: 'en'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_CONNECTION</term> <listitem> <simpara> - Contents of the <literal>Connection:</literal> header from - the current request, if there is one. Example: 'Keep-Alive'. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_HOST</term> <listitem> <simpara> - Contents of the <literal>Host:</literal> header from the - current request, if there is one. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_REFERER</term> <listitem> <simpara> - The address of the page (if any) which referred the browser - to the current page. This is set by the user's browser; not - all browsers will set this. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_USER_AGENT</term> <listitem> <simpara> - Contents of the <literal>User_Agent:</literal> header from - the current request, if there is one. This is a string - denoting the browser software being used to view the current - page; i.e. <computeroutput>Mozilla/4.5 [en] (X11; U; Linux - 2.2.9 i586)</computeroutput>. Among other things, you can use - this value with <function>get_browser</function> to tailor - your page's functionality to the capabilities of the user's - browser. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REMOTE_ADDR</term> <listitem> <simpara> - The IP address from which the user is viewing the current - page. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REMOTE_PORT</term> <listitem> <simpara> - The port being used on the user's machine to communicate with - the web server. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SCRIPT_FILENAME</term> <listitem> <simpara> - The absolute pathname of the currently executing script. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_ADMIN</term> <listitem> <simpara> - The value given to the SERVER_ADMIN (for Apache) directive in - the web server configuration file. If the script is running - on a virtual host, this will be the value defined for that - virtual host. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_PORT</term> <listitem> <simpara> - The port on the server machine being used by the web server - for communication. For default setups, this will be '80'; - using SSL, for instance, will change this to whatever your - defined secure HTTP port is. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SERVER_SIGNATURE</term> <listitem> <simpara> - String containing the server version and virtual host name - which are added to server-generated pages, if enabled. - </simpara> </listitem> </varlistentry> <varlistentry> <term>PATH_TRANSLATED</term> <listitem> <simpara> - Filesystem- (not document root-) based path to the current - script, after the server has done any virtual-to-real - mapping. - </simpara> </listitem> </varlistentry> <varlistentry> <term>SCRIPT_NAME</term> <listitem> <simpara> - Contains the current script's path. This is useful for pages - which need to point to themselves. - </simpara> </listitem> </varlistentry> <varlistentry> <term>REQUEST_URI</term> <listitem> <simpara> - The URI which was given in order to access this page; for - instance, '/index.html'. - </simpara> </listitem> </varlistentry> </variablelist> </para> </sect2> <sect2 id="language.variables.predefined.environment"> <title>Environment variables</title> <simpara> - These variables are imported into PHP's global namespace from the - environment under which the PHP parser is running. Many are - provided by the shell under which PHP is running and different - systems are likely running different kinds of shells, a - definitive list is impossible. Please see your shell's - documentation for a list of defined environment variables. - </simpara> <simpara> - Other environment variables include the CGI variables, placed - there regardless of whether PHP is running as a server module or - CGI processor. - </simpara> </sect2> <sect2 id="language.variables.predefined.php"> <title>PHP variables</title> <simpara> - These variables are created by PHP itself. The - <varname>$HTTP_*_VARS</varname> variables are available only if - the <link linkend="ini.track-vars">track_vars</link> - configuration is turned on. - </simpara> <note> <para> - As of PHP 4.0.3, <link linkend="ini.track-vars">track_vars</link> is always turned on, - regardless of the configuration file setting. - </para> </note> <para> - If the <link linkend="ini.register-globals">register_globals</link> directive - is set, then these variables will also be made available in the - global scope of the script; i.e., separate from the - <varname>$HTTP_*_VARS</varname> arrays. This feature should be - used with care, and turned off if possible; while the - <varname>$HTTP_*_VARS</varname> variables are safe, the bare - global equivalents can be overwritten by user input, with - possibly malicious intent. If you cannot turn off <link linkend="ini.register-globals">register_globals</link>, you must - take whatever steps are necessary to ensure that the data you are - using is safe. - </para> <para> <variablelist> <varlistentry> <term>argv</term> <listitem> <simpara> - Array of arguments passed to the script. When the script is - run on the command line, this gives C-style access to the - command line parameters. When called via the GET method, this - will contain the query string. - </simpara> </listitem> </varlistentry> <varlistentry> <term>argc</term> <listitem> <simpara> - Contains the number of command line parameters passed to the - script (if run on the command line). - </simpara> </listitem> </varlistentry> <varlistentry> <term>PHP_SELF</term> <listitem> <simpara> - The filename of the currently executing script, relative to - the document root. If PHP is running as a command-line - processor, this variable is not available. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_COOKIE_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via HTTP cookies. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_GET_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the HTTP GET method. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_POST_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the HTTP POST method. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_POST_FILES</term> <listitem> <simpara> - An associative array of variables containing information - about files uploaded via the HTTP POST method. See <link linkend="features.file-upload.post-method">POST method - uploads</link> for information on the contents of - <varname>$HTTP_POST_FILES</varname>. - </simpara> <para> <varname>$HTTP_POST_FILES</varname> is available only in PHP - 4.0.0 and later. - </para> </listitem> </varlistentry> <varlistentry> <term>HTTP_ENV_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script via the parent environment. - </simpara> </listitem> </varlistentry> <varlistentry> <term>HTTP_SERVER_VARS</term> <listitem> <simpara> - An associative array of variables passed to the current - script from the HTTP server. These variables are analogous to - the Apache variables described above. - </simpara> </listitem> </varlistentry> </variablelist> </para> </sect2> </sect1> <sect1 id="language.variables.scope"> <title>ë³ì ì¬ì© ë²ì (Variable Scope)</title> <simpara> + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT_CHARSET</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Charset:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'iso-8859-1,*,utf-8'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ENCODING</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Encoding:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'gzip'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ACCEPT_LANGUAGE</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Accept-Language:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'en'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_CONNECTION</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Connection:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + ì: 'Keep-Alive'. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_HOST</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>Host:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_REFERER</term> + <listitem> + <simpara> + íì¬ íì´ì§ë¥¼ ì°¾ìì¨ íì´ì§. íì¬íì´ì§ë¡ ëì´ì¤ë ë§í¬ê° ìê³ , + ì´ ë§í¬ë¥¼ í´ë¦íì¬ íì¬ íì´ì§ë¡ ëì´ì¨ ê²½ì° ì´ì íì´ì§ì 주ìê° ì¤ì ëë¤. + ì´ ê°ì ì¬ì©ìì ë¸ë¼ì°ì ì ë°ë¼ ì¤ì ë ìë ìê³ ìë ìë ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_USER_AGENT</term> + <listitem> + <simpara> + íì¬ì ì구(request)ì í¬í¨ë <literal>User_Agent:</literal> í¤ëì ë´ì© (ì¡´ì¬íë ê²½ì°ë§). + íì¬ íì´ì§ë¥¼ íë©´ì íìí ë¸ë¼ì°ì ìíí¸ì¨ì´ì ìì§ì´ ëë 문ìì´ì´ë¤. + ì:<computeroutput>Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)</computeroutput> + í¹í, ì´ ê°ì <function>get_browser</function>í¨ìì í¨ê» ì¬ì©íë©´, + í´ë¹ íì´ì§ë¥¼ ìì©ìì ë¸ë¼ì°ì ì ë¥ë ¥ì ë§ì¶°ì ë§ë¤ì´ ë¼ ìë ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REMOTE_ADDR</term> + <listitem> + <simpara> + ì¬ì©ìê° íì¬ íì´ì§ë¥¼ ë³´ê³ ìë ìì¤í ì IP 주ì + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REMOTE_PORT</term> + <listitem> + <simpara> + ì¬ì©ìì ìì¤í ì´ ì¹ìë²ì íµì íê³ ìë port ë²í¸ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SCRIPT_FILENAME</term> + <listitem> + <simpara> + íì¬ ì¤íëê³ ìë ì¤í¬ë¦½í¸ì ì ë ê²½ë¡ëª + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_ADMIN</term> + <listitem> + <simpara> + ì¹ìë² ì¤ì íì¼ìì SERVER_ADMIN (Apacheì ì) ì§ììì ì¤ì ëì´ ìë ê°. + ë§ì½ ì¤í¬ë¦½í¸ê° ê°ì í¸ì¤í¸ ììì ì¤íëê³ ìë¤ë©´ ì´ ê°ì virtual host ì¤ì ë´ì ì¤ì ë ê°ì´ ëë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_PORT</term> + <listitem> + <simpara> + ì¹ìë²ê° ì¬ì©íë port ë²í¸. 기본ê°ì¼ë¡ ë³´íµ '80'ì´ ì¬ì©ëì§ë§, + ì를ë¤ì´ SSLì ì¬ì©íë ê²½ì° ì¬ë¬ë¶ì´ ì§ì í secure HTTP í¬í¸ì ê°ì´ ì¬ì©ëë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SERVER_SIGNATURE</term> + <listitem> + <simpara> + server-generated íì´ì§ì ì¶ê°ëë ìë² ë²ì ê³¼ ê°ì í¸ì¤í¸ ëª . (enabledë ê²½ì°ë§) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>PATH_TRANSLATED</term> + <listitem> + <simpara> + 모ë virtualì realë¡ì ì íì ë§ì¹ í, íì¬ íì´ì§ì íì¼ìì¤í 기ì¤ì ê²½ë¡. + (document root 기ì¤ì´ ìëë¤.) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>SCRIPT_NAME</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì ê²½ë¡. ì´ê²ì í´ë¹ íì´ì§ê° ì기 ìì ì ê°ë¦¬í¬ ë ì¬ì©íë©´ ì ì©íë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>REQUEST_URI</term> + <listitem> + <simpara> + ì´ íì´ì§ë¥¼ ì ê·¼í기 ìí´ ì¬ì©í URI. ì: '/index.html'. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect2> + <sect2 id="language.variables.predefined.environment"> + <title>íê²½ ë³ì (Environment variables)</title> + <simpara> + ì´ ë³ìë¤ì PHP íìê° ì¤íëê³ ìë íê²½ ë³ìë¡ ë¶í° PHPì ì ì ë³ì ììì¼ë¡ ì®ê²¨ì§ ë³ìë¤ì´ë¤. + ë§ì ë³ìë PHPê° ì¤íëë ììì ì ê³µíê³ ìê³ , ê·¸ ë´ì©ì ìì¤í ê³¼ ìì ë°ë¼ 모ë ê°ê° ë¤ë¥´ê¸° + ë문ì ëª íí ë³ìë¤ì 목ë¡ì ì ìíë ê²ì ë¶ê°ë¥íë¤. + ì´ë¤ íê²½ ë³ìë¤ì´ ì ì ëì´ ìëì§ ììë³´ë ¤ë©´ ì¬ë¬ë¶ì ìì ê´í 문ì를 ì´í´ ë³´ëë¡ íë¼. + </simpara> + <simpara> + CGI ë³ì를 í¬í¨í ë¤ë¥¸ íê²½ë³ìë¤ì PHPê° CGIë¡ ëìíê±°ë 모ëë¡ ëìíê±´ ê°ì + ì¬ì©í ì ìë¤. + </simpara> + </sect2> + <sect2 id="language.variables.predefined.php"> + <title>PHP ë³ì</title> + <simpara> + ì´ ë³ìë¤ì PHP ìì ì´ ë§ëë ê²ì´ë¤. + + <varname>$HTTP_*_VARS</varname> ë³ìë¤ì + <link linkend="ini.track-vars">track_vars</link> ì¤ì ì´ + ì¼ì ¸ ìë ê²½ì°ìë§ ì¬ì©ì´ ê°ë¥íë¤. + </simpara> + <note> + <para> + PHP 4.0.3ìì <link linkend="ini.track-vars">track_vars</link>ë ì¤ì íì¼ì ì¤ì ê³¼ ê´ê³ìì´ íì ì¼ì ¸ ìë¤. + </para> + </note> + <para> + ë§ì½ <link linkend="ini.register-globals">register_globals</link> ì§ììê° ì¤ì ëì´ ìì¼ë©´, + ì´ ë³ìë¤ì ì¤í¬ë¦½í¸ì ì ì ìììì ì ê·¼ ê°ë¥í ë³ìë¡ ë§ë¤ì´ ì§ë¤. + (<varname>$HTTP_*_VARS</varname> ë°°ì´ ë³ììë ë³ëë¡ ìì±ëë¤.) + ì´ ì¤ì ì ë§¤ì° ì¡°ì¬í´ì ì¬ì©í´ì¼ íê³ , ê°ë¥íë©´ ì´ ì¤ì ì 꺼 ëê³ + <varname>$HTTP_*_VARS</varname> ë³ì를 ì¬ì©íë ê²ì´ ìì íë¤. + ì ìì ì¸ ìë를 ê°ì§ ì¬ì©ìê° ì¬ì©ì ì ë ¥ì ì¬ì©í´ì ìë ìë + ì ì ë³ìì ë´ì©ì ë®ì´ ì¨ ë²ë¦´ ì ìë¤. + ë§ì½ <link linkend="ini.register-globals">register_globals</link>ì¤ì ì ë ì ìë ìí©ì´ë¼ë©´, + ì¬ë¬ë¶ì´ í´ë¹ ë³ì를 ì¬ì©íë ê° ì¤í ë§ë¤ ê·¸ ë³ìê° ìì í ê²ì¸ì§ë¥¼ ë°ëì íì¸íë ì ì°¨ê° ìì´ì¼ íë¤. + </para> + <para> + <variablelist> + <varlistentry> + <term>argv</term> + <listitem> + <simpara> + ì¤í¬ë¦½í¸ì ì ë¬ë ìê·ë¨¼í¸(argument)ì ë°°ì´. + ì¤í¬ë¦½í¸ê° 커맨ëë¼ì¸ ìì ì¤íëìë¤ë©´, 커맨ëë¼ì¸ì íë¼ë©í°ë¤ì + C ííë¡ ì ê·¼í ì ìê² í´ ì¤ë¤. ë§ì½ GET ë°©ìì¼ë¡ í¸ì¶ë ê²½ì°ë¼ë©´, + ì´ ë°°ì´ì 쿼리 문ìì´ì ë´ì©ì ë´ê³ ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>argc</term> + <listitem> + <simpara> + ì¤í¬ë¦½í¸ë¡ ëì´ì¨ 커맨ëë¼ì¸ íë¼ë©í°ì ê°ì. (커맨ëë¼ì¸ ííë¡ í¸ì¶í ê²½ì°) + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>PHP_SELF</term> + <listitem> + <simpara> + document root를 기ì¤ì¼ë¡ í íì¬ ì¤íì¤ì¸ ì¤í¬ë¦½í¸ì íì¼ ì´ë¦. + PHP를 커맨ëë¼ì¸ì¼ë¡ ìíí ê²½ì° ì´ ë³ìë ì¬ì©í ì ìë¤. + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_COOKIE_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP ì¿ í¤ë¥¼ ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_GET_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP GET ë©ìë를 ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_POST_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP POST ë©ìë를 ì¬ì©í´ ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_POST_FILES</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP POST ë©ìë를 ì¬ì©í´ ì ë¡ëë íì¼ì ëí ì 보를 ê°ì§ associative ë°°ì´ + <varname>$HTTP_POST_FILES</varname> ë°°ì´ì ë´ì©ì ëí ìì¸í ì ë³´ë + <link linkend="features.file-upload.post-method">POST method uploads</link> ë¶ë¶ì ì´í´ë³´ì. + </simpara> + <para> + <varname>$HTTP_POST_FILES</varname> ë³ìë 4.0.0 ì´íììë§ ì í¨íë¤. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_ENV_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì íì¬ íê²½ ë³ììì ì ë¬ë ë³ìì associative ë°°ì´ + </simpara> + </listitem> + </varlistentry> + <varlistentry> + <term>HTTP_SERVER_VARS</term> + <listitem> + <simpara> + íì¬ ì¤í¬ë¦½í¸ì HTTP ìë²ìì ì ë¬ë ë³ìì associative ë°°ì´ + ì´ ë³ìë¤ì ììì ì¸ê¸í Apache ë³ìë¤ê³¼ ì ì¬í ë´ì©ì¼ë¡ ëì´ìë¤. + </simpara> + </listitem> + </varlistentry> + </variablelist> + </para> + </sect2> + </sect1> + <sect1 id="language.variables.scope"> + <title>ë³ì ì¬ì© ë²ì (Variable Scope)</title> + <simpara> ë³ìê° ì¬ì©ê°ë¥í ê³³ì ê·¸ ë³ìê° ì ì¸ë ê³³ ììì ë§ì´ë¤. PHP ë³ìì ëë¶ë¶ì í ê°ì ë²ì(single scope)ë§ì ê°ì§ê³ ìë¤. ì´ ë²ìë includeë requireëì´ì ì½íì¨ íì¼ìë ëì¼íê² ì ì©ëë¤. ì를ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; include "b.inc"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ììì <varname>$a</varname>ë³ìë <filename>b.inc</filename> ì¤í¬ë¦½í¸ììë ì¬ì©í ì ìë¤. 기본ì ì¼ë¡ í¨ì ììì ì ì¸ë ê²ì í¨ì ìììë§ ì¬ì©ëë ì§ì ë³ìì´ë¤. ëí í¨ì ììì ì¬ì©ëë í¨ìë¤ì 기본ì ì¼ë¡ ì§ì ë³ìë¼ê³ ê°ì íê³ ì°¾ê² ëë¤. ì를 ë¤ì´: - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; /* global scope */ Function Test () { @@ -222,12 +481,16 @@ } Test (); - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì´ ì¤í¬ë¦½í¸ë í¨ì ìì <varname>$a</varname> ë³ì를 ì§ìë³ìë¡ ê°ì íìê³ , ì§ìë³ì $aìë ì무 ê°ë ëì ëì§ ìì기 ë문ì ìë¬´ë° ì¶ë ¥ë ëíëì§ ìëë¤. ì´ê²ì Cìë ì½ê° ì°¨ì´ê° ëë ë¶ë¶ì´ë¤. PHPìì ì ìë³ì를 ì¬ì©íë ¤ë©´ ì¬ì©íê³ ì¶ì ì ì ë³ì를 í¨ì ìì global ì ì¸ì í´ ì£¼ì´ì¼ íë¤. ì를 ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; $b = 2; @@ -239,15 +502,20 @@ Sum (); echo $b; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ìì ì¤í¬ë¦½í¸ë "3"ì ì¶ë ¥í ê²ì´ë¤. í¨ì ë´ìì <varname>$a</varname>ì <varname>$b</varname>를 globalë¡ ì ì¸íì¼ë¯ë¡, ì´ í¨ìë´ì $a, $bë ì ì ë³ì를 참조íê² ëë¤. í¨ì ë´ìì ë¤ë£° ì ìë ì ìë³ìì ê°ììë ì íì´ ìë¤. - </simpara> <simpara> + </simpara> + <simpara> ì ì ë³ì를 참조íë ë ë²ì§¸ ë°©ë²ì PHPìì í¹ë³í ì ìíê³ ìë $GLOBALSë¼ë ë°°ì´ì ì¬ì©íë ê²ì´ë¤. ìì ì를 ë¤ìê³¼ ê°ì´ ë°ê¿ ì¸ ì ìë¤. : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = 1; $b = 2; @@ -257,42 +525,57 @@ Sum (); echo $b; - </programlisting> </informalexample> <simpara> <varname>$GLOBALS</varname> ë°°ì´ì ë³ìì´ë¦ì´ Keyê° ëê³ , + </programlisting> + </informalexample> + <simpara> + <varname>$GLOBALS</varname> ë°°ì´ì ë³ìì´ë¦ì´ Keyê° ëê³ , ê·¸ ë³ìì ë´ì©ì´ ê°ì´ ëë ìì를 ê°ì§ associative ë°°ì´ì´ë¤. - </simpara> <simpara> - ë³ì ë²ìì ê´ë ¨íì¬ ììëì´ì¼ í ë ë¤ë¥¸ ë´ì©ì¼ë¡ <emphasis>ì ì </emphasis> ë³ì(static variable)ê° ìë¤ë¤. - ì ì ë³ìë ì§ì í¨ì ë´ììë§ ì¡´ì¬íì§ë§ ì§ì í¨ìê° ì¢ ë£ëì´ë ê·¸ ê°ì ì½ì´ë²ë¦¬ì§ ìê³ ê°ì§ê³ ìë¤. ë¤ì ì를 ë³´ì : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <simpara> + ë³ì ë²ìì ê´ë ¨íì¬ ììëì´ì¼ í ë ë¤ë¥¸ ë´ì©ì¼ë¡ + <emphasis>ì ì </emphasis> ë³ì(static variable)ê° ìë¤ë¤. + ì ì ë³ìë ì§ì í¨ì ë´ììë§ ì¡´ì¬íì§ë§ ì§ì í¨ìê° ì¢ ë£ëì´ë + ê·¸ ê°ì ì½ì´ë²ë¦¬ì§ ìê³ ê°ì§ê³ ìë¤. ë¤ì ì를 ë³´ì : + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { $a = 0; echo $a; $a++; } - </programlisting> </informalexample> <simpara> - This function is quite useless since every time it is called it - sets <varname>$a</varname> to <literal>0</literal> and prints - "0". The <varname>$a</varname>++ which increments the - variable serves no purpose since as soon as the function exits the - <varname>$a</varname> variable disappears. To make a useful - counting function which will not lose track of the current count, - the <varname>$a</varname> variable is declared static: - </simpara> <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + <simpara> + ì´ í¨ìë ì´ í¨ìê° í¸ì¶ë ëë§ë¤ <varname>$a</varname>를 <literal>0</literal>ì¼ë¡ ì¤ì íê³ + "0"ì ì¶ë ¥íë¤. ì´ í¨ìê° ì¢ ë£ëë ìì ìì <varname>$a</varname> ë³ìê° ì¬ë¼ì§ë¯ë¡ + ì¦ê° ì°ì°ì¸ <varname>$a</varname>++ë 무ì미í ëª ë ¹ì´ ëë¤. + íì¬ì ì를 ìì§ ìê³ ê³ì ì¸ì´ëê°ë ì¹´ì´í í¨ì를 ë§ë¤ê¸° ìí´ìë + ë¤ìê³¼ ê°ì´ <varname>$a</varname> ë³ì를 ì ì ì¼ë¡ ì ì¸í´ì¼ íë¤. + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { static $a = 0; echo $a; $a++; } - </programlisting> </informalexample> <simpara> - Now, every time the Test() function is called it will print the - value of <varname>$a</varname> and increment it. - </simpara> <simpara> + </programlisting> + </informalexample> + <simpara> + ì´ì Test() í¨ìê° í¸ì¶ë ë ë§ë¤ <varname>$a</varname>ì ê°ì + ì¶ë ¥íê³ ê·¸ ê°ì íë ì¦ê° ìí¨ë¤. + </simpara> + <simpara> ëí ì ì ë³ìë ë¤ìê³¼ ê°ì´ recursionìì ë°ëì íìíë¤. ì¬ê·ì ì¸ í¨ìë ì기 ìì ì í¨ì를 í¸ì¶íë ê²ì ë§íë¤. ì¬ê·ì ì¸ í¨ì를 ì¬ì©í ëë 무í 루íì ë¹ ì§ ì ì기 ë문ì ë§¤ì° ì£¼ì를 ìíë¤. ë°ë¼ì ì¬ë¬ë¶ì ì¬ê· í¸ì¶ì ëë´ë ì ì í ë°©ë²ì ë§ë ¨í´ ëì´ì¼ íë¤. ë¤ìì ê°ë¨í ìì ë 10ë²ì ì¬ê·ì í¸ì¶ì íë¤. ì ì ë³ì <varname>$count</varname>를 ì¬ì©íì¬ ì¤ë¨ë ì기를 ì ì ìë¤. - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> Function Test () { static $count = 0; @@ -303,28 +586,52 @@ } $count--; } - </programlisting> </informalexample> </sect1> <sect1 id="language.variables.variable"> <title>ê°ë³ ë³ì (Variable variables)</title> <simpara> + </programlisting> + </informalexample> + </sect1> + <sect1 id="language.variables.variable"> + <title>ê°ë³ ë³ì (Variable variables)</title> + <simpara> ê°ë ë³ìì ì´ë¦ì ë³ê²½í ì ìë¤ë©´ í¸ë¦¬íë¤ê³ ëë ëê° ìë¤. ì´ì ë³ìì ì´ë¦ì ë°ê¾¸ì´ ì¬ì©íë ë°©ë²ì ììë³´ì. ë³´íµì ë³ì ì ì¸ì ë¤ìê³¼ ê°ë¤.: - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $a = "hello"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ê°ë³ ë³ìì ë³ìì ê°ì ê°ì§ ìë ìê³ , ëí ì´ ê°ì ë³ìì ì´ë¦ì¼ë¡ ë¤ë£° ìë ìë¤. ìì ììì $$를 ì¬ì©íë©´ <emphasis>hello</emphasis>ê° ë³ì ì´ë¦ì´ ë ì ìë¤. ì : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> $$a = "world"; - </programlisting> </informalexample> <simpara> - ì´ë ê² íë©´ PHPì symbol treeìë "hello"ë¼ë ê°ì ê°ì§ë <varname>$a</varname>ì "world"ë¼ë ê°ì ê°ì§ë - <varname>$hello</varname>ì ë ê°ì ë³ìê° ìê¸°ê² ëë¤. ê·¸ë¬ë¯ë¡ ë¤ìê³¼ ê°ì 문ì¥ì : - </simpara> <informalexample> <programlisting role="php"> + </programlisting> + </informalexample> + <simpara> + ì´ë ê² íë©´ PHPì symbol treeìë "hello"ë¼ë ê°ì ê°ì§ë + <varname>$a</varname>ì "world"ë¼ë ê°ì ê°ì§ë + <varname>$hello</varname>ì ë ê°ì ë³ìê° ìê¸°ê² ëë¤. + ê·¸ë¬ë¯ë¡ ë¤ìê³¼ ê°ì 문ì¥ì : + </simpara> + <informalexample> + <programlisting role="php"> echo "$a ${$a}"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ë¤ì 문ì¥ê³¼ ë ê°ì ì¶ë ¥ì ëíë´ê² ëë¤.: - </simpara> <informalexample> <programlisting> + </simpara> + <informalexample> + <programlisting> echo "$a $hello"; - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> i.e. ëì ì¶ë ¥: <computeroutput>hello world</computeroutput>. - </simpara> <simpara> + </simpara> + <simpara> ê°ë³ ë³ì를 ë°°ì´ê³¼ í¨ê» ì¬ì©íë ¤ë©´, íê°ì§ 모í¸ì± 문ì 를 í´ê²°í´ì¼ íë¤. ê·¸ê²ì, ë§ì½ ì¬ë¬ë¶ì´ <varname>$$a[1]</varname>ì´ë¼ê³ ì¼ì¼ë©´, <varname>$a[1]</varname>ì íëì ë³ìë¡ ë³¼ ê²ì¸ì§, @@ -332,32 +639,48 @@ ë¤ìê³¼ ê°ì´ íì¬ ëª¨í¸ì±ì í´ê²°íì. ì ìì ê²½ì° <varname>${$a[1]}</varname>ë¼ê³ ì°ê³ , íìì ê²½ì°ë <varname>${$a}[1]</varname>ë¼ê³ ì°ë©´ ëë¤. ( ìì주: ê°ë³ ë³ì를 ëíë¼ ëë íì { }ë¡ ëë¬ ì¸ë ê²ì´ 보기 ì¢ê³ ì¤ë¥ë ìì¨ ì ìë¤.) - </simpara> </sect1> <sect1 id="language.variables.external"> <title>PHP ë°ìì ì¨ ë³ìë¤ (Variables from outside PHP)</title> <sect2 id="language.variables.external.form"> <title>HTML Forms (GET and POST)</title> <simpara> + </simpara> + </sect1> + <sect1 id="language.variables.external"> + <title>PHP ë°ìì ì¨ ë³ìë¤ (Variables from outside PHP)</title> + <sect2 id="language.variables.external.form"> + <title>HTML Forms (GET and POST)</title> + <simpara> í¼ì´ PHP ì¤í¬ë¦½í¸ë¡ submitëë©´ í¼ì ìë 모ë ë´ì©ë¤ì´ ìëì ì¼ë¡ ë§ë¤ì´ì§ PHP ë³ìë¡ ë¤ì´ì¨ë¤. ë§ì½ <link linkend="ini.track-vars">track_vars</link> ìµì ì´ onì¼ë¡ ì¤ì ëì´ ìì¼ë©´, ì´ ë³ìë¤ ëª¨ëë ê·¸ê²ì´ ì´ëì ë§ë¤ì´ì§ ê²ì´ëì ë°ë¼ì <varname>$HTTP_POST_VARS</varname>, - <varname>$HTTP_GET_VARS</varname>, <varname>$HTTP_POST_FILES</varname>ì associative ë°°ì´ì ìì¹íê² ëë¤. - </simpara> <para> + <varname>$HTTP_GET_VARS</varname>, + <varname>$HTTP_POST_FILES</varname>ì associative ë°°ì´ì ìì¹íê² ëë¤. + </simpara> + <para> ì´ ë³ììëí ìì¸í ì¤ëª ì <link linkend="language.variables.predefined">미리 ì ìë ë³ì (Predefined variables)</link>ì ì½ì´ë³´ê¸° ë°ëë¤. - </para> <para> <example> <title>Simple form variable</title> <programlisting role="php"> + </para> + <para> + <example> + <title>Simple form variable</title> + <programlisting role="php"> <form action="foo.php" method="post"> Name: <input type="text" name="username"><br> <input type="submit"> </form> - </programlisting> </example> </para> <para> - - When the above form is submitted, the value from the text input - will be available in - <varname>$HTTP_POST_VARS['username']</varname>. If the <link linkend="ini.register-globals">register_globals</link> - configuration directive is turned on, then the variable will also - be available as <varname>$username</varname> in the global scope. - </para> <simpara> - PHP also understands arrays in the context of form variables. You - may, for example, group related variables together, or use this - feature to retrieve values from a multiple select - input: - </simpara> <para> <example> <title>More complex form variables</title> <programlisting role="php"> + </programlisting> + </example> + </para> + <para> + ìì í¼ì´ ì ì¡ë ë, text inputì ë´ì©ì <varname>$HTTP_POST_VARS['username']</varname>ì ìë¤. + ë§ì½ <link linkend="ini.register-globals">register_globals</link> ì§ììê° ì¼ì ¸ ìì¼ë©´, + ì¤í¬ë¦½í¸ì ì ì ìììì <varname>$username</varname>ì´ë¼ë ë³ììë ì´ ê°ì´ ì ì¥ëë¤. + </para> + <simpara> + PHPë í¼ ë³ìì ë°°ì´ì ì¬ì©í ìë ìë¤. + ì를ë¤ì´, ë´ì©ì ì¼ë¡ 묶ì ì ìë ë³ìë¤ì íëì ë°°ì´ë¡ 묶ì ì ìê³ , + ì´ ê¸°ë¥ì select 문ì ì¬ì©íì¬ ë¤ì¤ ì íì 구íí ì ìë¤. + </simpara> + <para> + <example> + <title>More complex form variables</title> + <programlisting role="php"> <form action="array.php" method="post"> Name: <input type="text" name="personal[name]"><br> Email: <input type="text" name="personal[email]"><br> @@ -369,19 +692,34 @@ </select> <input type="submit"> </form> - </programlisting> </example> </para> <para> - In PHP 3, the array form variable usage is limited to - single-dimensional arrays. In PHP 4, no such restriction applies. - </para> <sect3 id="language.variables.external.form.submit"> <title>IMAGE SUBMITì ë³ì ì´ë¦</title> <simpara> + </programlisting> + </example> + </para> + <para> + PHP3ìì í¼ ë°°ì´ì ì¬ì©ëë ë°°ì´ì ì¼ì°¨ì ë°°ì´ë¡ ì íëìì§ë§, + PHP4ììë ì´ ì íì´ ìì´ì¡ë¤. + </para> + <sect3 id="language.variables.external.form.submit"> + <title>IMAGE SUBMITì ë³ì ì´ë¦</title> + <simpara> í¼ì submití ë ì¼ë°ì ì¼ë¡ ì¬ì©íë submit ë²í¼ ëì ë¤ìê³¼ ê°ì´ 그림ì ì¬ì©í ìë ìë¤. : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> <input type=image src="image.gif" name="sub"> - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì¬ì©ìê° image를 í´ë¦íë©´, í¼ì sub_xì sub_yì ë ê°ì ë³ìê° ì¶ê°ëì´ ìë²ì ì ì¡ëë¤. ì´ ë ë³ìë ì´ë¯¸ì§ìì ì¬ì©ìê° clickí ìì¹ ì 보를 ë´ê³ ìë¤. ì¼ë¶ ë¸ë¼ì°ì ììë ë°ì¤(_)ëì ë§ì¹¨í(.)를 ì¬ì©íë ê²½ì°ë ìëë°, PHPë ì´ë° ê²½ì° ìëì ì ë§ì¹¨í(.)를 ë°ì¤(_)ë¡ ë°ê¿ì¤ë¤. - </simpara> </sect3> </sect2> <sect2 id="language.variables.external.cookies"> <title>HTTP Cookies</title> <simpara> + </simpara> + </sect3> + </sect2> + <sect2 id="language.variables.external.cookies"> + <title>HTTP Cookies</title> + <simpara> PHPë HTTP ì¿ í¤ë¥¼ <ulink url="&spec.cookies;">Netscape's Spec</ulink>ì ì ìì ë°ë¼ ì ê³µíë¤. Cookie ë©ì¹´ëì¦ì í¸ëí¹ì´ë ì¬ì©ì ìë³ ë±ì ìí´ ì격 browserì ì ì¥ë ë°ì´í°ë¥¼ ëë ¤ ë°ë ê³¼ì ì ë§íë¤. ì¬ë¬ë¶ì cookie를 ì¤ì í기 ìí´ <function>SetCookie</function>í¨ì를 ì¬ì©í ì ìë¤. @@ -389,31 +727,52 @@ í¨ìë ë¸ë¼ì°ì ë¡ ë³´ë´ë ì´ë¤ ë°ì´í°ë³´ë¤ë ìì ì¬ì©í´ì¼ íë¤. ì´ ì ì½ì <function>Header</function> í¨ìì ê°ì ì ì½ì¼ë¡ ë³´ë©´ ëë¤. ë³´ë¸ ëª¨ë cookieë ìëì ì¼ë¡ GETì´ë POST ë°©ì ë°ì´í°ì ê°ì PHP ë³ìë¡ ë³íëë¤. - </simpara> <simpara> + </simpara> + <simpara> ë§ì½ ì¬ë¬ë¶ì´ ëì¼í cookieì ì¬ë¬ ê°ì ì ì¥íê³ ì¶ë¤ë©´ Cookieì´ë¦ì <emphasis>[]</emphasis>를 ëíë©´ ëë¤. ì를 ë¤ì´ : - </simpara> <informalexample> <programlisting role="php"> + </simpara> + <informalexample> + <programlisting role="php"> SetCookie ("MyCookie[]", "Testing", time()+3600); - </programlisting> </informalexample> <simpara> + </programlisting> + </informalexample> + <simpara> ì¿ í¤ë ìë¡ ì¤ì íë©´ pathë ëë©ì¸ì´ ë¤ë¥´ì§ ìë í ì´ì ì ì¿ í¤ë¥¼ ë®ì´ì°ê² ëë¤. ê·¸ë¬ë¯ë¡ ì¼í ì¹´í¸ ê°ì ìì© íë¡ê·¸ë¨ììë ë¤ìê³¼ ê°ì´ ì¹´ì´í°ë¥¼ ì¬ì©íì¬, ì´ê²ì 기ì¤ì¼ë¡ Cookie를 ì¬ì©íë ê²ì´ ì¢ë¤. ì : - </simpara> <example> <title>SetCookie Example</title> <programlisting role="php"> + </simpara> + <example> + <title>SetCookie Example</title> + <programlisting role="php"> $Count++; SetCookie ("Count", $Count, time()+3600); SetCookie ("Cart[$Count]", $item, time()+3600); - </programlisting> </example> </sect2> <sect2 id="language.variables.external.environment"> <title>íê²½ ë³ì (Environment variables)</title> <para> + </programlisting> + </example> + </sect2> + <sect2 id="language.variables.external.environment"> + <title>íê²½ ë³ì (Environment variables)</title> + <para> PHPë ìëì ì¼ë¡ íê²½ ë³ìë¤ì ì¼ë°ì ì¸ PHP ë³ìë¡ ë§ë ë¤. - <informalexample> <programlisting role="php"> + <informalexample> + <programlisting role="php"> echo $HOME; /* Shows the HOME environment variable, if set. */ - </programlisting> </informalexample> </para> <para> + </programlisting> + </informalexample> + </para> + <para> GET, POST, Cookie ë©ì¹´ëì¦ì íµí´ì ë¤ì´ ì¨ ì ë³´ë¡ë¶í°ë PHP ë³ìê° ì기ë¯ë¡, ëëë¡ íê²½ë³ìë¡ë¶í° ë°ìê²ì´ íì¤íê°ë¥¼ íì¸í íìê° ìì ëë ìë¤. ì´ë¥¼ ìí´ <function>getenv</function> í¨ì를 ì¬ì©íë¤. íê²½ ë³ì를 ì¤ì í기 ìí´ìë <function>putenv</function> í¨ì를 ì¬ì©íë¤. - </para> </sect2> <sect2 id="language.variables.external.dot-in-names"> <title>ì¸ë¶ ë³ìëª ì ìë '.' (Dots in incoming variable names)</title> <para> + </para> + </sect2> + <sect2 id="language.variables.external.dot-in-names"> + <title>ì¸ë¶ ë³ìëª ì ìë '.' (Dots in incoming variable names)</title> + <para> ì¼ë°ì ì¼ë¡ PHPë ë³ì를 ì¤í¬ë¦½í¸ë¡ ê°ì ¸ì¬ ë ë³ìëª ì ë°ê¾¸ì§ ìëë¤. ê·¸ë¬ë, PHPì ë³ìëª ìë '.' (ì )ì ì¬ì©í ì ìë¤. ë¤ìê³¼ ê°ì ê²½ì°ë¥¼ ë³´ì. : <programlisting role="php"> @@ -422,16 +781,25 @@ ìì ê²½ì° PHP íìë <varname>$varname</varname>ì´ë¼ë ë³ìì, ì°ê²° ì°ì°ì, 'ext'(ë°ì´íê° ìë ê²½ì° ê·¸ê²ì´ ì´ë¤ ìë ¤ì§ í¤ë ìì½ì´ê° ìëë©´ 문ìì´ë¡ ì·¨ê¸ëë¤.)ë¡ í´ìíë¤. ì´ê²ì ì°ë¦¬ê° ìíë ê²°ê³¼ê° ìëë¤. - </para> <para> + </para> + <para> ìì ê°ì ì´ì ë¡ PHPë ì¸ë¶ìì ë¶ë¬ë¤ì¸ ë³ìì ì´ë¦ì '.'ì´ ìì¼ë©´ '_'(ë°ì¤)ë¡ ë°ê¾¸ì´ ì½ì´ë¤ì¸ë¤. - </para> </sect2> <sect2 id="language.variables.determining-type-of"> <title>ë³ìì Type íë¨ (Determining variable types)</title> <para> + </para> + </sect2> + <sect2 id="language.variables.determining-type-of"> + <title>ë³ìì Type íë¨ (Determining variable types)</title> + <para> PHPë ë³ìì typeì ììì ì íê³ (ì¼ë°ì ì¼ë¡) íìí ê²½ì°ìë ê·¸ typeì ë°ê¾¸ë¯ë¡, í¹ì ìì ì ê·¸ ë³ì ì´ë¤ typeì¸ì§ë ì½ê² ì ì ìë¤. PHPë ë³ìì typeì ìì보기 ìí´ ì¬ë¬ê°ì í¨ì를 ê°ì§ê³ ìë¤. <function>gettype</function>, <function>is_long</function>, <function>is_double</function>, <function>is_string</function>, <function>is_array</function>, <function>is_object</function> ê° ê·¸ê²ë¤ì´ë¤. - </para> </sect2> </sect1></chapter><!-- Keep this comment at the end of the file + </para> + </sect2> + </sect1> +</chapter> +<!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t @@ -446,4 +814,4 @@ sgml-local-catalogs:nil sgml-local-ecat-files:nil End: - -->ÿ \ No newline at end of file + -->