cvs: phpdoc /kr/functions http.xml
| From: | Jaemin Byon | Date: | Sat, 24 Feb 2001 05:27:13 +0000 |
| Subject: | cvs: phpdoc /kr/functions http.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969334429@lists.php.net to get a copy of this message | ||
noribsd Fri Feb 23 21:27:13 2001 EDT
Modified files:
/phpdoc/kr/functions http.xml
Log:
whole contents in http.xml translated by noribsd
Index: phpdoc/kr/functions/http.xml diff -u phpdoc/kr/functions/http.xml:1.3 phpdoc/kr/functions/http.xml:1.4 --- phpdoc/kr/functions/http.xml:1.3 Fri Feb 23 19:12:08 2001 +++ phpdoc/kr/functions/http.xml Fri Feb 23 21:27:13 2001 @@ -3,66 +3,41 @@ <titleabbrev>HTTP</titleabbrev> <partintro> - <simpara> - These functions let you manipulate the output sent back to the - remote browser right down to the HTTP protocol level. + <simpara> ì¬ê¸° ì¤ëª ëì´ì§ í¨ìë¤ì ì격ë¸ë¼ì°ì ì ë³´ë´ì§ ê°ì¢ ì¶ë ¥ë¤ì HTTP íë¡í ì½ì ì¶©ì¤í 기ë°íì¬ ë¤ë£° ì ìê² í´ì¤ë¤. </simpara> </partintro> <refentry id="function.header"> <refnamediv> <refname>header</refname> - <refpurpose>Send a raw HTTP header</refpurpose> + <refpurpose>HTTP í¤ë를 ì ì¡íë¤.</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>í¨ì ì¤ëª </title> <funcsynopsis> <funcprototype> <funcdef>int <function>header</function></funcdef> <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - The <function>Header</function> function is used at the top of an - <acronym>HTML</acronym> file to send raw <acronym>HTTP</acronym> - header strings. See the <ulink url="&spec.http1.1;">HTTP 1.1 - Specification</ulink> for more information on raw http headers. + <para> <function>Header</function> í¨ìë <acronym>HTML</acronym> íì¼ ìë¨ì <acronym>HTTP</acronym> í¤ë 문ìì´ì ì ì¡íë¤. HTTP í¤ëì ëí ìì¸í ì ë³´ë <ulink url="&spec.http1.1;">HTTP 1.1 Specification</ulink> 를 참조í기 ë°ëë¤. </para> - <para> - There are two special-case header calls. The first is the - "Location" header. Not only does it send this header - back to the browser, it also returns a REDIRECT status code to - Apache. From a script writer's point of view this should not be - important, but for people who understand Apache internals it is - important to understand. - <informalexample> + <para> í¤ëì ê´ë ¨ë ëê°ì§ í¹ë³í ê²½ì°ê° ìë¤. 첫ë²ì§¸ë¡ "Location " í¤ëì ëí´ ì¤ëª íê² ë¤. ì´ê²ì ì§ì ë í¤ëë´ì©ì ë¸ë¼ì°ì ì ì ì¡íë©´ì ëìì ìíì¹ ìë²ë¡ REDIRECT ì½ë(REDIRECT status code)를 ëë ¤ì¤ë¤. ì¤í¬ë¦½í¸ ìì±ìì ê´ì ì¼ë¡ ë³¼ë ì´ê²ì ë³ë¡ ì¤ìí ê²ì´ ìëì§ë§ ìíì¹ ë´ë¶ëìì ê´ì¬ì´ ìë ì¬ëë¤ì ììëì´ì¼ í ê²ì´ë¤. <informalexample> <programlisting role="php"> -header ("Location: http://www.php.net"); /* Redirect browser - to PHP web site */ -exit; /* Make sure that code below does - not get executed when we redirect. */ +header ("Location: http://www.php.net"); /* PHP ì¹ì¬ì´í¸ë¡ + 리ë¤ì´ë í¸íë¤. */ +exit; /* 리ë¤ì´ë í¸ëê³ ììë ìëì ìë + ì½ëê° ì¤íëì§ ìëë¡ íë¤ */ </programlisting> </informalexample> </para> - <para> - The second special-case is any header that starts with the - string, "HTTP/" (case is not significant). For - example, if you have your ErrorDocument 404 Apache directive - pointed to a PHP script, it would be a good idea to make sure - that your PHP script is actually generating a 404. The first - thing you do in your script should then be: - <informalexample> + <para> ëë²ì§¸ë "HTTP/" 문ìì´ë¡ ììíë í¤ë를 ì¬ì©íë ê²½ì°ì´ë¤. (ëì문ìë ìê´ìì) ì를 ë¤ì´, ìíì¹ì ErrorDocument 404 ì§ììê° ì¬ë¬ë¶ì PHP ì¤í¬ë¦½í¸ë¥¼ ê°ë¦¬í¤ê² í´ëìë¤ë©´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤ì ë¡ 404 ì½ë를 ìì±íê³ ìëì§ íì¤í í´ëë ê²ì´ ì¢ë¤. ìëì ì를 참조íë¼. <informalexample> <programlisting role="php"> header ("HTTP/1.0 404 Not Found"); </programlisting> </informalexample> </para> - <para> - PHP scripts often generate dynamic HTML that must not be cached - by the client browser or any proxy caches between the server and the - client browser. Many proxies and clients can be forced to disable - caching with - <informalexample> + <para> PHP ì¤í¬ë¦½í¸ë¥¼ ì¬ì©íë¤ë³´ë©´ í´ë¼ì´ì¸í¸ ë¸ë¼ì°ì ì íë¡ììë²ì ìºì¬ëì§ ë§ìì¼í ì¶ë ¥(ì: ë¤ì´ë´ë¯¹ HTML)ì ë§ë¤ì´ì¼ í ê²½ì°ê° ìë¤. ì´ë´ ê²½ì° ìëì ê°ì´ í´ë¼ì´ì¸í¸ì íë¡ììë²ì ìºì¬ê¸°ë¥ì ê°ì ë¡ í´ì í ì ìë¤. <informalexample> <programlisting role="php"> header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @@ -72,27 +47,19 @@ </programlisting> </informalexample> </para> - <para> - Remember that the <function>header</function> function must be - called before any actual output is sent, either by normal HTML - tags blank lines in a file, or from PHP. It is a very common - error to read code with <function>include</function>, or - <function>require</function>, functions, or another file access - function, and have spaces or empty lines that will output before - <function>header</function> is called. The same problem exists - when using a single PHP/HTML file. + <para> <function>header</function> í¨ìë HTMLì 공백ë¼ì¸ì´ë PHPê° ë§ë¤ì´ë¸ ì´ë í ì¶ë ¥ë³´ë¤ë ê°ì¥ 먼ì í¸ì¶ëì´ì¼ íë¤. <function>header</function> í¨ìê° í¸ì¶ë기 ì ì <function>include</function> ì <function>require</function> í¹ì 기í ë¤ë¥¸ íì¼ìì¸ì¤ ê´ë ¨ í¨ì를 ì¬ì©íê±°ë ì½ëë´ì 공백ì ë£ë ê²½ì°ë ì¤í¬ë¦½í¸ ìì±ìê° íí ì ì§ë¥´ë ì¤ìì´ë¤. ì¤ë ¹ PHP/HTML íì¼ íëë§ ì¬ì©íë¤ê³ í´ë ì´ê°ì ì¤ìì ê°ë¥ì±ì ì¬ì í ì¡´ì¬íë¤. <informalexample> <programlisting role="php"> <?php require("user_logging.inc") ?> <?php header ("Content-Type: audio/x-pn-realaudio"); ?> -// Broken, Note the blank lines above +// ìì¤ì ê³µë°±ì´ ìì¼ë¯ë¡ ì ëë¡ ëìíì§ ìì ê²ì´ë¤. </programlisting> </informalexample> </para> <para> - See also <function>headers_sent</function> + <function>headers_sent</function>ë ì°¸ê³ íë¼. </para> </refsect1> </refentry> @@ -100,10 +67,10 @@ <refentry id="function.headers-sent"> <refnamediv> <refname>headers_sent</refname> - <refpurpose>Returns true if headers have been sent</refpurpose> + <refpurpose>í¤ëê° ì ì¡ëìì¼ë©´ ì°¸(true)ì ëë ¤ì¤ë¤.</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>í¨ì ì¤ëª </title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>headers_sent</function></funcdef> @@ -111,11 +78,9 @@ </funcprototype> </funcsynopsis> <para> - This function returns true if the HTTP headers have already been - sent, false otherwise. - </para> + ì´ í¨ìë HTTP í¤ëê° ì´ë¯¸ ì ì¡ëì´ì§ ê²½ì° ì°¸(true)ì, ë°ëì ê²½ì° ê±°ì§(false)ì ëë ¤ì¤ë¤. </para> <para> - See also <function>header</function> + <function>header</function>ë ì°¸ê³ íë¼. </para> </refsect1> </refentry> @@ -123,7 +88,7 @@ <refentry id="function.setcookie"> <refnamediv> <refname>setcookie</refname> - <refpurpose>Send a cookie</refpurpose> + <refpurpose>ì¿ í¤ë¥¼ ì¤ì íë¤.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -148,56 +113,25 @@ </paramdef> </funcprototype> </funcsynopsis> + <para> <function>Setcookie</function> í¨ìë ì¿ í¤ë¥¼ ì¤ì í기 ìí´ ì°ì¸ë¤. ì¿ í¤ë ë¤ë¥¸ ì´ë í í¤ëë³´ë¤ë <emphasis>먼ì </emphasis> ì ì¡ëì´ì¼ íë¤. (ì´ê²ì PHPìë ìê´ìë ì¿ í¤ ìì²´ì ì ì½ì´ë¤) ì¦, ì´ í¨ì를 ì°ê¸° ìí´ì ë <literal><html></literal> ì´ë <literal><head></literal> ë´ë¶ì ì¤ë ì´ë í íê·¸ë¤ ë³´ë¤ ë¨¼ì í¸ì¶ëì´ì¼ íë ê²ì´ë¤. </para> + <para> <parameter>name</parameter> ì ì ì¸í 모ë ì¸ìë¤ì ì íì ì¼ë¡ 주ì´ì§ ì ìë¤. (ë§ì½ <parameter>name</parameter>ì¸ìë§ ì£¼ì´ì§ ê²½ì° ê·¸ ì´ë¦ì ê°ì§ ì¿ í¤ë 모ë ìì ë ê²ì´ë¤). ëí 주ì´ì§ì§ ìì ì¸ì를 ë¹ ë¬¸ìì´ (<emphasis>""</emphasis>) ë¡ ëì²´í ì ìë¤. <emphasis>expire</emphasis> ì <emphasis>secure</emphasis> ì¸ìë ì ìê° ì´ë©°, 주ì´ì§ì§ ìì ê²½ì° ë¹ ë¬¸ìì´ë¡ ëì²´ë ì ìë ëì ì«ì 0 ì¼ë¡ ëì²´í ì ìë¤. <emphasis>expire</emphasis> ì¸ìë íì¤ ì ëì¤ ìê°ì¼ë¡ <function>time</function> ì´ë <function>mktime</function> í¨ìê° ëë ¤ë³´ë´ë ì ìê°ì ì¸ ì ìë¤. <function>secure</function> ì¸ìê° ì§ì ë ì¿ í¤ë ìì í HTTPS ì ìììë§ ì ì¡ì´ íì©ëë¤. </para> <para> - <function>Setcookie</function> defines a cookie to be sent along - with the rest of the header information. Cookies must be sent - <emphasis>before</emphasis> any other headers are sent (this is a - restriction of cookies, not PHP). This requires you to place - calls to this function before any <literal><html></literal> or - <literal><head></literal> tags. - </para> - <para> - All the arguments except the <parameter>name</parameter> argument - are optional. If only the name argument is present, the cookie - by that name will be deleted from the remote client. You may - also replace any argument with an empty string - (<emphasis>""</emphasis>) in order to skip that - argument. The <parameter>expire</parameter> and - <parameter>secure</parameter> arguments are integers and cannot - be skipped with an empty string. Use a zero - (<emphasis>0</emphasis>) instead. The - <parameter>expire</parameter> argument is a regular Unix time - integer as returned by the <function>time</function> or - <function>mktime</function> functions. The - <parameter>secure</parameter> indicates that the cookie should - only be transmitted over a secure HTTPS connection. - </para> - <para> - Common Pitfalls: + 주ìí´ì¼í ì¬í: <itemizedlist> <listitem> <simpara> - Cookies will not become visible until the next loading of a page that - the cookie should be visible for. - </simpara> + ì¿ í¤ë ê·¸ ì¿ í¤ë¥¼ ì í¨íê² í기 ìí´ íì´ì§ë¥¼ ì¬ë¡ë©í기 ì ê¹ì§ë ìë ëì§ ìëë¤. </simpara> </listitem> <listitem> <simpara> - Cookies must be deleted with the same parameters as they were set with. - </simpara> + ì¿ í¤ë ìì±ë ë¹ìì ì¸ì(parameter)를 ê·¸ëë¡ ë£ì´ ìì í´ì¼ íë¤. </simpara> </listitem> </itemizedlist> </para> - <simpara> - In PHP 3, multiple calls to <function>setcookie</function> in the same - script will be performed in reverse order. If you are trying to - delete one cookie before inserting another you should put the - insert before the delete. In PHP 4, multiple calls to - <function>setcookie</function> are performed in the order called. + <simpara> PHP3ë <function>setcookie</function> í¨ìê° íëì ì¤í¬ë¦½í¸ ììì ì¬ë¬ë² í¸ì¶ë ê²½ì° ê·¸ í¸ì¶ë ììì¼ë¡ ì²ë¦¬ë¥¼ íë¤. ì´ ê²½ì° ìë¡ì´ ì¿ í¤ë¥¼ íë ì¶ê°í기 ì ì 기존ì ì¿ í¤ë¥¼ íë ìì íë ¤ë©´ ì¶ê°íë êµ¬ë¬¸ì´ ìì íë êµ¬ë¬¸ë³´ë¤ ë¨¼ì ëì¬ì¼ ìíë 결과를 ì»ì ì ìë¤. ë°ëë¡ PHP4ë ì¬ë¬ë² í¸ì¶ë <function>setcookie</function> í¨ìë¤ì í¸ì¶ë ìì ê·¸ëë¡ ì²ë¦¬íë¤. </simpara> <para> - Some examples follow how to send cookies: - <example> + ìëë ì¿ í¤ë¥¼ ì ì¡íë ìì ì´ë¤: <example> <title><function>Setcookie</function> send examples</title> <programlisting role="php"> setcookie ("TestCookie", "Test Value"); @@ -207,26 +141,19 @@ </example> </para> <para> - Examples follow how to delete cookies send in previous example: + ìëë ìì ìì ìì ì ì¡í ì¿ í¤ë¥¼ ìì íë ìì ì´ë¤: <example> <title><function>setcookie</function> delete examples</title> <programlisting role="php"> setcookie ("TestCookie"); -// set the expiration date to one hour ago +// ë§ë£ì기를 íìê° ì ì¼ë¡ ì¤ì setcookie ("TestCookie", "", time() - 3600); setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1); </programlisting> </example> - When deleting a cookie you should assure that the expiration date - is in the past, to trigger the removal mechanism in your browser. - </para> + ì¿ í¤ë¥¼ ìì íë ¤ë©´ ì¸ìë¡ ì£¼ì´ì§ ë§ë£ìê¸°ê° ë§ë£ìì ì 기ì¤ì¼ë¡ 과거를 ê°ë¦¬í¤ê³ ìëì§ íì¸í´ì¼ íë¤. </para> <para> - Note that the value portion of the cookie will automatically be - urlencoded when you send the cookie, and when it is received, it - is automatically decoded and assigned to a variable by the same - name as the cookie name. To see the contents of our test - cookie in a script, simply use one of the following examples: - <informalexample> + ì¿ í¤ì ì¼ë¶ë¶ì íìí ê²½ì° ìëì ì¼ë¡ urlì¸ì½ë©(urlencoded)ì´ ëí ì ì¡ì´ ëë©°, ê·¸ê²ì ë¤ì ë°ì ê²½ì°ìë ìëì ì¸ ëì½ë© ë° ì¿ í¤ ì´ë¦ì í´ë¹íë ë³ìí ë¹ì´ ì´ë£¨ì´ì§ë¤. ìì¸í ì¬íì ìëì ìì 를 참조íë¼: <informalexample> <programlisting role="php"> echo $TestCookie; echo $HTTP_COOKIE_VARS["TestCookie"]; @@ -234,12 +161,7 @@ </informalexample> </para> <para> - You may also set array cookies by using array notation in the - cookie name. This has the effect of setting as many cookies as - you have array elements, but when the cookie is received by your - script, the values are all placed in an array with the cookie's - name: - <informalexample> + ëí ì¬ë¬ë¶ì ì¿ í¤ ì´ë¦ì ë°°ì´ê¸°ìë²(array notation)ì íì©íì¬ ë°°ì´ííì ì¿ í¤(array cookies)를 ë§ë¤ ì ìë¤. ì´ë¬í ë°©ë²ì ë¹ì ì´ ê°ì§ ê³ ìë ë°°ì´ììì ê°¯ìë§í¼ ëì¼í ê°¯ìì ì¿ í¤ë¥¼ ì¤ì í ì ìì¼ë©°, ì´ë¬í ë°©ë²ì¼ë¡ ì¤ì ë ì¿ í¤ë¥¼ ê°ì ¸ì¬ ëìë ê°ê°ì ì¿ í¤ê°ë¤ì´ ì¤ì ë¹ìì ì¿ í¤ì´ë¦ì íì©í ë°°ì´ì ííë¡ ë³ìí ë¹ì´ ì´ë£¨ì´ì§ë¤. <informalexample> <programlisting role="php"> setcookie ("cookie[three]", "cookiethree"); setcookie ("cookie[two]", "cookietwo"); @@ -251,22 +173,12 @@ } </programlisting> </informalexample> - </para> - <para> - For more information on cookies, see Netscape's cookie - specification at <ulink - url="&spec.cookies;">&spec.cookies;</ulink>. </para> + <para> ì¿ í¤ì ëí ìì¸í ì ë³´ë ë·ì¤ì¼ì´íìì ì ê³µíë <ulink url="&spec.cookies;">&spec.cookies;</ulink> 문ì를 참조í기 ë°ëë¤. </para> <simpara> - Microsoft Internet Explorer 4 with Service Pack 1 applied does - not correctly deal with cookies that have their path parameter - set. - </simpara> + ê²½ë¡ì¸ì(path parameter set)ì í¨ê» ì¤ì ë ì¿ í¤ë ìë¹ì¤í© 1 ì´ ì ì©ë ë§ì´í¬ë¡ìíí¸ ì¸í°ë· ìµì¤íë¡ë¬ 4 ìì ì ëë¡ ëìíì§ ìëë¤. </simpara> <simpara> - Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x - appear to handle cookies incorrectly when the path and time - are not set. - </simpara> + ê²½ë¡ì¸ì(path)ì ë§ë£ì기(time)ê° ì¤ì ëì§ ìì ì¿ í¤ë ë·ì¤ì¼ì´í 커뮤ëì¼ì´í° 4.05 ì ë§ì´í¬ë¡ìíí¸ ì¸í°ë· ìµì¤íë¡ë¬ 3.x ìì ì ëë¡ ëìíì§ ìëë¤. </simpara> </refsect1> </refentry>
Index: phpdoc/kr/functions/http.xml diff -u phpdoc/kr/functions/http.xml:1.3 phpdoc/kr/functions/http.xml:1.4 --- phpdoc/kr/functions/http.xml:1.3 Fri Feb 23 19:12:08 2001 +++ phpdoc/kr/functions/http.xml Fri Feb 23 21:27:13 2001 @@ -3,66 +3,41 @@ <titleabbrev>HTTP</titleabbrev> <partintro> - <simpara> - These functions let you manipulate the output sent back to the - remote browser right down to the HTTP protocol level. + <simpara> ì¬ê¸° ì¤ëª ëì´ì§ í¨ìë¤ì ì격ë¸ë¼ì°ì ì ë³´ë´ì§ ê°ì¢ ì¶ë ¥ë¤ì HTTP íë¡í ì½ì ì¶©ì¤í 기ë°íì¬ ë¤ë£° ì ìê² í´ì¤ë¤. </simpara> </partintro> <refentry id="function.header"> <refnamediv> <refname>header</refname> - <refpurpose>Send a raw HTTP header</refpurpose> + <refpurpose>HTTP í¤ë를 ì ì¡íë¤.</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>í¨ì ì¤ëª </title> <funcsynopsis> <funcprototype> <funcdef>int <function>header</function></funcdef> <paramdef>string <parameter>string</parameter></paramdef> </funcprototype> </funcsynopsis> - <para> - The <function>Header</function> function is used at the top of an - <acronym>HTML</acronym> file to send raw <acronym>HTTP</acronym> - header strings. See the <ulink url="&spec.http1.1;">HTTP 1.1 - Specification</ulink> for more information on raw http headers. + <para> <function>Header</function> í¨ìë <acronym>HTML</acronym> íì¼ ìë¨ì <acronym>HTTP</acronym> í¤ë 문ìì´ì ì ì¡íë¤. HTTP í¤ëì ëí ìì¸í ì ë³´ë <ulink url="&spec.http1.1;">HTTP 1.1 Specification</ulink> 를 참조í기 ë°ëë¤. </para> - <para> - There are two special-case header calls. The first is the - "Location" header. Not only does it send this header - back to the browser, it also returns a REDIRECT status code to - Apache. From a script writer's point of view this should not be - important, but for people who understand Apache internals it is - important to understand. - <informalexample> + <para> í¤ëì ê´ë ¨ë ëê°ì§ í¹ë³í ê²½ì°ê° ìë¤. 첫ë²ì§¸ë¡ "Location " í¤ëì ëí´ ì¤ëª íê² ë¤. ì´ê²ì ì§ì ë í¤ëë´ì©ì ë¸ë¼ì°ì ì ì ì¡íë©´ì ëìì ìíì¹ ìë²ë¡ REDIRECT ì½ë(REDIRECT status code)를 ëë ¤ì¤ë¤. ì¤í¬ë¦½í¸ ìì±ìì ê´ì ì¼ë¡ ë³¼ë ì´ê²ì ë³ë¡ ì¤ìí ê²ì´ ìëì§ë§ ìíì¹ ë´ë¶ëìì ê´ì¬ì´ ìë ì¬ëë¤ì ììëì´ì¼ í ê²ì´ë¤. <informalexample> <programlisting role="php"> -header ("Location: http://www.php.net"); /* Redirect browser - to PHP web site */ -exit; /* Make sure that code below does - not get executed when we redirect. */ +header ("Location: http://www.php.net"); /* PHP ì¹ì¬ì´í¸ë¡ + 리ë¤ì´ë í¸íë¤. */ +exit; /* 리ë¤ì´ë í¸ëê³ ììë ìëì ìë + ì½ëê° ì¤íëì§ ìëë¡ íë¤ */ </programlisting> </informalexample> </para> - <para> - The second special-case is any header that starts with the - string, "HTTP/" (case is not significant). For - example, if you have your ErrorDocument 404 Apache directive - pointed to a PHP script, it would be a good idea to make sure - that your PHP script is actually generating a 404. The first - thing you do in your script should then be: - <informalexample> + <para> ëë²ì§¸ë "HTTP/" 문ìì´ë¡ ììíë í¤ë를 ì¬ì©íë ê²½ì°ì´ë¤. (ëì문ìë ìê´ìì) ì를 ë¤ì´, ìíì¹ì ErrorDocument 404 ì§ììê° ì¬ë¬ë¶ì PHP ì¤í¬ë¦½í¸ë¥¼ ê°ë¦¬í¤ê² í´ëìë¤ë©´ ê·¸ ì¤í¬ë¦½í¸ê° ì¤ì ë¡ 404 ì½ë를 ìì±íê³ ìëì§ íì¤í í´ëë ê²ì´ ì¢ë¤. ìëì ì를 참조íë¼. <informalexample> <programlisting role="php"> header ("HTTP/1.0 404 Not Found"); </programlisting> </informalexample> </para> - <para> - PHP scripts often generate dynamic HTML that must not be cached - by the client browser or any proxy caches between the server and the - client browser. Many proxies and clients can be forced to disable - caching with - <informalexample> + <para> PHP ì¤í¬ë¦½í¸ë¥¼ ì¬ì©íë¤ë³´ë©´ í´ë¼ì´ì¸í¸ ë¸ë¼ì°ì ì íë¡ììë²ì ìºì¬ëì§ ë§ìì¼í ì¶ë ¥(ì: ë¤ì´ë´ë¯¹ HTML)ì ë§ë¤ì´ì¼ í ê²½ì°ê° ìë¤. ì´ë´ ê²½ì° ìëì ê°ì´ í´ë¼ì´ì¸í¸ì íë¡ììë²ì ìºì¬ê¸°ë¥ì ê°ì ë¡ í´ì í ì ìë¤. <informalexample> <programlisting role="php"> header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); @@ -72,27 +47,19 @@ </programlisting> </informalexample> </para> - <para> - Remember that the <function>header</function> function must be - called before any actual output is sent, either by normal HTML - tags blank lines in a file, or from PHP. It is a very common - error to read code with <function>include</function>, or - <function>require</function>, functions, or another file access - function, and have spaces or empty lines that will output before - <function>header</function> is called. The same problem exists - when using a single PHP/HTML file. + <para> <function>header</function> í¨ìë HTMLì 공백ë¼ì¸ì´ë PHPê° ë§ë¤ì´ë¸ ì´ë í ì¶ë ¥ë³´ë¤ë ê°ì¥ 먼ì í¸ì¶ëì´ì¼ íë¤. <function>header</function> í¨ìê° í¸ì¶ë기 ì ì <function>include</function> ì <function>require</function> í¹ì 기í ë¤ë¥¸ íì¼ìì¸ì¤ ê´ë ¨ í¨ì를 ì¬ì©íê±°ë ì½ëë´ì 공백ì ë£ë ê²½ì°ë ì¤í¬ë¦½í¸ ìì±ìê° íí ì ì§ë¥´ë ì¤ìì´ë¤. ì¤ë ¹ PHP/HTML íì¼ íëë§ ì¬ì©íë¤ê³ í´ë ì´ê°ì ì¤ìì ê°ë¥ì±ì ì¬ì í ì¡´ì¬íë¤. <informalexample> <programlisting role="php"> <?php require("user_logging.inc") ?> <?php header ("Content-Type: audio/x-pn-realaudio"); ?> -// Broken, Note the blank lines above +// ìì¤ì ê³µë°±ì´ ìì¼ë¯ë¡ ì ëë¡ ëìíì§ ìì ê²ì´ë¤. </programlisting> </informalexample> </para> <para> - See also <function>headers_sent</function> + <function>headers_sent</function>ë ì°¸ê³ íë¼. </para> </refsect1> </refentry> @@ -100,10 +67,10 @@ <refentry id="function.headers-sent"> <refnamediv> <refname>headers_sent</refname> - <refpurpose>Returns true if headers have been sent</refpurpose> + <refpurpose>í¤ëê° ì ì¡ëìì¼ë©´ ì°¸(true)ì ëë ¤ì¤ë¤.</refpurpose> </refnamediv> <refsect1> - <title>Description</title> + <title>í¨ì ì¤ëª </title> <funcsynopsis> <funcprototype> <funcdef>boolean <function>headers_sent</function></funcdef> @@ -111,11 +78,9 @@ </funcprototype> </funcsynopsis> <para> - This function returns true if the HTTP headers have already been - sent, false otherwise. - </para> + ì´ í¨ìë HTTP í¤ëê° ì´ë¯¸ ì ì¡ëì´ì§ ê²½ì° ì°¸(true)ì, ë°ëì ê²½ì° ê±°ì§(false)ì ëë ¤ì¤ë¤. </para> <para> - See also <function>header</function> + <function>header</function>ë ì°¸ê³ íë¼. </para> </refsect1> </refentry> @@ -123,7 +88,7 @@ <refentry id="function.setcookie"> <refnamediv> <refname>setcookie</refname> - <refpurpose>Send a cookie</refpurpose> + <refpurpose>ì¿ í¤ë¥¼ ì¤ì íë¤.</refpurpose> </refnamediv> <refsect1> <title>Description</title> @@ -148,56 +113,25 @@ </paramdef> </funcprototype> </funcsynopsis> + <para> <function>Setcookie</function> í¨ìë ì¿ í¤ë¥¼ ì¤ì í기 ìí´ ì°ì¸ë¤. ì¿ í¤ë ë¤ë¥¸ ì´ë í í¤ëë³´ë¤ë <emphasis>먼ì </emphasis> ì ì¡ëì´ì¼ íë¤. (ì´ê²ì PHPìë ìê´ìë ì¿ í¤ ìì²´ì ì ì½ì´ë¤) ì¦, ì´ í¨ì를 ì°ê¸° ìí´ì ë <literal><html></literal> ì´ë <literal><head></literal> ë´ë¶ì ì¤ë ì´ë í íê·¸ë¤ ë³´ë¤ ë¨¼ì í¸ì¶ëì´ì¼ íë ê²ì´ë¤. </para> + <para> <parameter>name</parameter> ì ì ì¸í 모ë ì¸ìë¤ì ì íì ì¼ë¡ 주ì´ì§ ì ìë¤. (ë§ì½ <parameter>name</parameter>ì¸ìë§ ì£¼ì´ì§ ê²½ì° ê·¸ ì´ë¦ì ê°ì§ ì¿ í¤ë 모ë ìì ë ê²ì´ë¤). ëí 주ì´ì§ì§ ìì ì¸ì를 ë¹ ë¬¸ìì´ (<emphasis>""</emphasis>) ë¡ ëì²´í ì ìë¤. <emphasis>expire</emphasis> ì <emphasis>secure</emphasis> ì¸ìë ì ìê° ì´ë©°, 주ì´ì§ì§ ìì ê²½ì° ë¹ ë¬¸ìì´ë¡ ëì²´ë ì ìë ëì ì«ì 0 ì¼ë¡ ëì²´í ì ìë¤. <emphasis>expire</emphasis> ì¸ìë íì¤ ì ëì¤ ìê°ì¼ë¡ <function>time</function> ì´ë <function>mktime</function> í¨ìê° ëë ¤ë³´ë´ë ì ìê°ì ì¸ ì ìë¤. <function>secure</function> ì¸ìê° ì§ì ë ì¿ í¤ë ìì í HTTPS ì ìììë§ ì ì¡ì´ íì©ëë¤. </para> <para> - <function>Setcookie</function> defines a cookie to be sent along - with the rest of the header information. Cookies must be sent - <emphasis>before</emphasis> any other headers are sent (this is a - restriction of cookies, not PHP). This requires you to place - calls to this function before any <literal><html></literal> or - <literal><head></literal> tags. - </para> - <para> - All the arguments except the <parameter>name</parameter> argument - are optional. If only the name argument is present, the cookie - by that name will be deleted from the remote client. You may - also replace any argument with an empty string - (<emphasis>""</emphasis>) in order to skip that - argument. The <parameter>expire</parameter> and - <parameter>secure</parameter> arguments are integers and cannot - be skipped with an empty string. Use a zero - (<emphasis>0</emphasis>) instead. The - <parameter>expire</parameter> argument is a regular Unix time - integer as returned by the <function>time</function> or - <function>mktime</function> functions. The - <parameter>secure</parameter> indicates that the cookie should - only be transmitted over a secure HTTPS connection. - </para> - <para> - Common Pitfalls: + 주ìí´ì¼í ì¬í: <itemizedlist> <listitem> <simpara> - Cookies will not become visible until the next loading of a page that - the cookie should be visible for. - </simpara> + ì¿ í¤ë ê·¸ ì¿ í¤ë¥¼ ì í¨íê² í기 ìí´ íì´ì§ë¥¼ ì¬ë¡ë©í기 ì ê¹ì§ë ìë ëì§ ìëë¤. </simpara> </listitem> <listitem> <simpara> - Cookies must be deleted with the same parameters as they were set with. - </simpara> + ì¿ í¤ë ìì±ë ë¹ìì ì¸ì(parameter)를 ê·¸ëë¡ ë£ì´ ìì í´ì¼ íë¤. </simpara> </listitem> </itemizedlist> </para> - <simpara> - In PHP 3, multiple calls to <function>setcookie</function> in the same - script will be performed in reverse order. If you are trying to - delete one cookie before inserting another you should put the - insert before the delete. In PHP 4, multiple calls to - <function>setcookie</function> are performed in the order called. + <simpara> PHP3ë <function>setcookie</function> í¨ìê° íëì ì¤í¬ë¦½í¸ ììì ì¬ë¬ë² í¸ì¶ë ê²½ì° ê·¸ í¸ì¶ë ììì¼ë¡ ì²ë¦¬ë¥¼ íë¤. ì´ ê²½ì° ìë¡ì´ ì¿ í¤ë¥¼ íë ì¶ê°í기 ì ì 기존ì ì¿ í¤ë¥¼ íë ìì íë ¤ë©´ ì¶ê°íë êµ¬ë¬¸ì´ ìì íë êµ¬ë¬¸ë³´ë¤ ë¨¼ì ëì¬ì¼ ìíë 결과를 ì»ì ì ìë¤. ë°ëë¡ PHP4ë ì¬ë¬ë² í¸ì¶ë <function>setcookie</function> í¨ìë¤ì í¸ì¶ë ìì ê·¸ëë¡ ì²ë¦¬íë¤. </simpara> <para> - Some examples follow how to send cookies: - <example> + ìëë ì¿ í¤ë¥¼ ì ì¡íë ìì ì´ë¤: <example> <title><function>Setcookie</function> send examples</title> <programlisting role="php"> setcookie ("TestCookie", "Test Value"); @@ -207,26 +141,19 @@ </example> </para> <para> - Examples follow how to delete cookies send in previous example: + ìëë ìì ìì ìì ì ì¡í ì¿ í¤ë¥¼ ìì íë ìì ì´ë¤: <example> <title><function>setcookie</function> delete examples</title> <programlisting role="php"> setcookie ("TestCookie"); -// set the expiration date to one hour ago +// ë§ë£ì기를 íìê° ì ì¼ë¡ ì¤ì setcookie ("TestCookie", "", time() - 3600); setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1); </programlisting> </example> - When deleting a cookie you should assure that the expiration date - is in the past, to trigger the removal mechanism in your browser. - </para> + ì¿ í¤ë¥¼ ìì íë ¤ë©´ ì¸ìë¡ ì£¼ì´ì§ ë§ë£ìê¸°ê° ë§ë£ìì ì 기ì¤ì¼ë¡ 과거를 ê°ë¦¬í¤ê³ ìëì§ íì¸í´ì¼ íë¤. </para> <para> - Note that the value portion of the cookie will automatically be - urlencoded when you send the cookie, and when it is received, it - is automatically decoded and assigned to a variable by the same - name as the cookie name. To see the contents of our test - cookie in a script, simply use one of the following examples: - <informalexample> + ì¿ í¤ì ì¼ë¶ë¶ì íìí ê²½ì° ìëì ì¼ë¡ urlì¸ì½ë©(urlencoded)ì´ ëí ì ì¡ì´ ëë©°, ê·¸ê²ì ë¤ì ë°ì ê²½ì°ìë ìëì ì¸ ëì½ë© ë° ì¿ í¤ ì´ë¦ì í´ë¹íë ë³ìí ë¹ì´ ì´ë£¨ì´ì§ë¤. ìì¸í ì¬íì ìëì ìì 를 참조íë¼: <informalexample> <programlisting role="php"> echo $TestCookie; echo $HTTP_COOKIE_VARS["TestCookie"]; @@ -234,12 +161,7 @@ </informalexample> </para> <para> - You may also set array cookies by using array notation in the - cookie name. This has the effect of setting as many cookies as - you have array elements, but when the cookie is received by your - script, the values are all placed in an array with the cookie's - name: - <informalexample> + ëí ì¬ë¬ë¶ì ì¿ í¤ ì´ë¦ì ë°°ì´ê¸°ìë²(array notation)ì íì©íì¬ ë°°ì´ííì ì¿ í¤(array cookies)를 ë§ë¤ ì ìë¤. ì´ë¬í ë°©ë²ì ë¹ì ì´ ê°ì§ ê³ ìë ë°°ì´ììì ê°¯ìë§í¼ ëì¼í ê°¯ìì ì¿ í¤ë¥¼ ì¤ì í ì ìì¼ë©°, ì´ë¬í ë°©ë²ì¼ë¡ ì¤ì ë ì¿ í¤ë¥¼ ê°ì ¸ì¬ ëìë ê°ê°ì ì¿ í¤ê°ë¤ì´ ì¤ì ë¹ìì ì¿ í¤ì´ë¦ì íì©í ë°°ì´ì ííë¡ ë³ìí ë¹ì´ ì´ë£¨ì´ì§ë¤. <informalexample> <programlisting role="php"> setcookie ("cookie[three]", "cookiethree"); setcookie ("cookie[two]", "cookietwo"); @@ -251,22 +173,12 @@ } </programlisting> </informalexample> - </para> - <para> - For more information on cookies, see Netscape's cookie - specification at <ulink - url="&spec.cookies;">&spec.cookies;</ulink>. </para> + <para> ì¿ í¤ì ëí ìì¸í ì ë³´ë ë·ì¤ì¼ì´íìì ì ê³µíë <ulink url="&spec.cookies;">&spec.cookies;</ulink> 문ì를 참조í기 ë°ëë¤. </para> <simpara> - Microsoft Internet Explorer 4 with Service Pack 1 applied does - not correctly deal with cookies that have their path parameter - set. - </simpara> + ê²½ë¡ì¸ì(path parameter set)ì í¨ê» ì¤ì ë ì¿ í¤ë ìë¹ì¤í© 1 ì´ ì ì©ë ë§ì´í¬ë¡ìíí¸ ì¸í°ë· ìµì¤íë¡ë¬ 4 ìì ì ëë¡ ëìíì§ ìëë¤. </simpara> <simpara> - Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x - appear to handle cookies incorrectly when the path and time - are not set. - </simpara> + ê²½ë¡ì¸ì(path)ì ë§ë£ì기(time)ê° ì¤ì ëì§ ìì ì¿ í¤ë ë·ì¤ì¼ì´í 커뮤ëì¼ì´í° 4.05 ì ë§ì´í¬ë¡ìíí¸ ì¸í°ë· ìµì¤íë¡ë¬ 3.x ìì ì ëë¡ ëìíì§ ìëë¤. </simpara> </refsect1> </refentry>