cvs: phpdoc /kr/features cookies.xml error-handling.xml file-upload.xml http-auth.xml images.xml
| From: | WonHee Hwang | Date: | Tue, 09 Jan 2001 11:27:54 +0000 |
| Subject: | cvs: phpdoc /kr/features cookies.xml error-handling.xml file-upload.xml http-auth.xml images.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969333507@lists.php.net to get a copy of this message | ||
regina Tue Jan 9 03:27:54 2001 EDT
Modified files:
/phpdoc/kr/features cookies.xml error-handling.xml file-upload.xml
http-auth.xml images.xml
Log:
Index: phpdoc/kr/features/cookies.xml diff -u phpdoc/kr/features/cookies.xml:1.1 phpdoc/kr/features/cookies.xml:1.2 --- phpdoc/kr/features/cookies.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/cookies.xml Tue Jan 9 03:27:54 2001 @@ -1,17 +1,17 @@ <chapter id="features.cookies"> <title>Cookies</title> <para> - PHPÎäî HTTP Cookieκ Ìà¨ÎÖÌïò;å(transparently) ÏßÄÏõêÌïúÎã§. - Cookie Ωîϼ¥Îãà϶òÏùÄ Ìä½ÎûòÌǼÏù¥ÎÇò ÏǨÏö©Ïûê ÏãùÎÑ Îì±ÏùÑ ÏúÑÌï¥ Ïõê;© browserÏóê - ÏÝÄÏûÎêú ÎçÏù¥ÌÑκ ÎèåÎݧ ÎõÎäî ͺÏÝïÏùÑ ÎßêÌïúÎã§. - Ïó¨Îü¨ÎÑÏùÄ cookieκ ÏѧÏÝïÌïòͽ ÏúÑÌï¥ <function>setcookie</function> Ìï®Ïàòκ ÏǨÏö©ÌïÝ Ïàò ÏûàÎã§. - CookieÎäî HTTP Ìó§ÎçîÏùò Ìïú ÎÄÎÑÏù¥ÎØÄΰú, <function>setcookie</function> Ìï®ÏàòÎäî νåÎùºÏöÏÝÄΰú - Î¥ÎÇ¥Îäî Ïñ¥Îñ§ ÎçÏù¥ÌÑÎ¥Îã§ÎèÑ ÏïûÏóê ÏǨÏö©Ìï¥Ïïº ÌïúÎã§. - Ïù¥ ÏÝúÏïÏùÄ <function>header</function> Ìï®ÏàòÏôÄ ÍôÏùÄ ÏÝúÏïÏúºÎ°ú ΥΩ¥ ÎêúÎã§.</para> + PHPë HTTP Cookie를 í¬ëª íê²(transparently) ì§ìíë¤. + Cookie ë©ì¹´ëì¦ì í¸ëí¹ì´ë ì¬ì©ì ìë³ ë±ì ìí´ ì격 browserì + ì ì¥ë ë°ì´í°ë¥¼ ëë ¤ ë°ë ê³¼ì ì ë§íë¤. + ì¬ë¬ë¶ì cookie를 ì¤ì í기 ìí´ <function>setcookie</function> í¨ì를 ì¬ì©í ì ìë¤. + Cookieë HTTP í¤ëì í ë¶ë¶ì´ë¯ë¡, <function>setcookie</function> í¨ìë ë¸ë¼ì°ì ë¡ + ë³´ë´ë ì´ë¤ ë°ì´í°ë³´ë¤ë ìì ì¬ì©í´ì¼ íë¤. + ì´ ì ì½ì <function>header</function> í¨ìì ê°ì ì ì½ì¼ë¡ ë³´ë©´ ëë¤.</para> <para> - ÌÅ¥ÎùºÏù¥Ïñ½Ìä½ÍÄ Î¥ÎÇ¥Ï§Ä Î®ÎìÝ cookieÎäî ÏûêÎèôÏÝÅÏúºÎ°ú GETÏù¥ÎÇò POST ΩÏãù ÎçÏù¥ÌÑÏôÄ ÍôÏùÄ PHP ÎÄÏàòΰú ÎÄÌôòÎêúÎã§. - ÎßåÏï Ïó¨Îü¨ÎÑÏù¥ ÎèôÏùºÌïú cookieÏóê Ïó¨Îü¨ ÍíÏùÑ ÏÝÄÏûÌïòÍÝ ÏãÎã§Î©¥ CookieÏù¥Î¶ÑÏóê <emphasis>[]</emphasis>κ ÎçîÌïòΩ¥ ÎêúÎã§. - ÏûêÏѽÌïú ;ÉÏùÄ <function>setcookie</function> Ìï®Ïàò ÏѧÎÖÏùÑ Ï½Ï°ÌïòÏûê. + í´ë¼ì´ì¸í¸ê° ë³´ë´ì¤ 모ë cookieë ìëì ì¼ë¡ GETì´ë POST ë°©ì ë°ì´í°ì ê°ì PHP ë³ìë¡ ë³íëë¤. + ë§ì½ ì¬ë¬ë¶ì´ ëì¼í cookieì ì¬ë¬ ê°ì ì ì¥íê³ ì¶ë¤ë©´ Cookieì´ë¦ì <emphasis>[]</emphasis>를 ëíë©´ ëë¤. + ìì¸í ê²ì <function>setcookie</function> í¨ì ì¤ëª ì 참조íì. </para> </chapter> <!-- Keep this comment at the end of the file Index: phpdoc/kr/features/error-handling.xml diff -u phpdoc/kr/features/error-handling.xml:1.1 phpdoc/kr/features/error-handling.xml:1.2 --- phpdoc/kr/features/error-handling.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/error-handling.xml Tue Jan 9 03:27:54 2001 @@ -1,7 +1,7 @@ <chapter id="features.error-handling"> <title>Error Handling</title> <para> - PHPÏóêÎäî Îã§Ïùåͺ ÍôÏùÄ Ïó¨Îü¨ ÏóêÎü¨ÏôÄ Í¾ÍÝ ÌòïÌÉúÍÄ ÏûàÎã§.: + PHPìë ë¤ìê³¼ ê°ì ì¬ë¬ ìë¬ì ê²½ê³ ííê° ìë¤.: <table> <title>PHP error types</title> <tgroup cols="4"> @@ -17,26 +17,26 @@ <row> <entry>1</entry> <entry>E_ERROR</entry> - <entry>Normal Function Errors (ÏùºÎòÏÝÅÏù½ ÏóêÎü¨)</entry> + <entry>Normal Function Errors (ì¼ë°ì ì¸ ìë¬)</entry> <entry/> </row> <row> <entry>2</entry> <entry>E_WARNING</entry> - <entry>Normal Warnings (ÏùºÎòÏÝÅÏù½ ;ÍÝ)</entry> + <entry>Normal Warnings (ì¼ë°ì ì¸ ê²½ê³ )</entry> <entry/> </row> <row> <entry>4</entry> <entry>E_PARSE</entry> - <entry>Parser Errors (Ψ½Î¾ï ÏóêÎü¨)</entry> + <entry>Parser Errors (ë¬¸ë² ìë¬)</entry> <entry/> </row> <row> <entry>8</entry> <entry>E_NOTICE </entry> <entry> - Notices (Ψ¥ÏãúÌïÝ Ïàò ÏûàÎäî ÏïåζºÏù¥ÏßÄÎßå ξÑÍ ½Ïùò ÍÄÎäÏѱÏùÑ ÍÄÏßÄÍÝ ÏûàÎäî ;Ïö) + Notices (무ìí ì ìë ì림ì´ì§ë§ ë²ê·¸ì ê°ë¥ì±ì ê°ì§ê³ ìë ê²½ì°) </entry> <entry/> </row> @@ -44,50 +44,50 @@ <entry>16</entry> <entry>E_CORE_ERROR</entry> <entry>fatal errors that occur during PHP's initial startup - (PHPÍÄ Ï¾òÏùå ÏãúÏûëÎêÝ Îïå ÎúÏÉùÌïú ϼòÎÖÏÝÅ ÏóêÎü¨)</entry> + (PHPê° ì²ì ììë ë ë°ìí ì¹ëª ì ìë¬)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>32</entry> <entry>E_CORE_WARNING</entry> <entry>warnings (non fatal errors) that occur during PHP's initial startup - (PHPÍÄ Ï¾òÏùå ÏãúÏûëÎêÝ Îïå ÎúÏÉùÌïú ϼòÎÖÏÝÅÏù¥ÏßÄ ÏïäÏùÄ Í¾ÍÝ)</entry> + (PHPê° ì²ì ììë ë ë°ìí ì¹ëª ì ì´ì§ ìì ê²½ê³ )</entry> <entry>PHP 4 only</entry> </row> <row> <entry>64</entry> <entry>E_COMPILE_ERROR</entry> - <entry>fatal compile-time errors (Ϫ¥ÌååÏùºÏãú ÏÉùͽ¥ ϼòÎÖÏÝÅ ÏóêÎü¨)</entry> + <entry>fatal compile-time errors (ì»´íì¼ì ì긴 ì¹ëª ì ìë¬)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>128</entry> <entry>E_COMPILE_WARNING</entry> - <entry>compile-time warnings (non fatal errors) (Ϫ¥ÌååÏùºÏãú ÎúÏÉùÌïú ϼòÎÖÏÝÅÏù¥ÏßÄ ÏïäÏùÄ Í¾ÍÝ)</entry> + <entry>compile-time warnings (non fatal errors) (ì»´íì¼ì ë°ìí ì¹ëª ì ì´ì§ ìì ê²½ê³ )</entry> <entry>PHP 4 only</entry> </row> <row> <entry>256</entry> <entry>E_USER_ERROR</entry> - <entry>user-generated error message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ ÏóêÎü¨ ΩîÏѽÏßÄ)</entry> + <entry>user-generated error message (ì¬ì©ìê° ë§ë ìë¬ ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>512</entry> <entry>E_USER_WARNING</entry> - <entry>user-generated warning message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ Í¾ÍÝ Î©îÏѽÏßÄ)</entry> + <entry>user-generated warning message (ì¬ì©ìê° ë§ë ê²½ê³ ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>1024</entry> <entry>E_USER_NOTICE </entry> - <entry>user-generated notice message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ Ïïåζº ΩîÏѽÏßÄ)</entry> + <entry>user-generated notice message (ì¬ì©ìê° ë§ë ì림 ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry/> <entry>E_ALL</entry> - <entry>all of the above, as supported (ÏßÄÏõêÍÄÎäÌïú ÏúÑÏùò Í¾É Î®Îëê)</entry> + <entry>all of the above, as supported (ì§ìê°ë¥í ìì ê² ëª¨ë)</entry> <entry/> </row> </tbody> @@ -130,9 +130,9 @@ </para> </warning> <para> - ήÎìÝ <link linkend="language.expressions">PHP ÌëúÌòÑÏãù(expression)</link>ÏùÄ "@"κ ÏïûÏóê ÎôÏù¥ÍÝ Ìò½ÏúÎêòΩ¥ error reportingÏùÑ ÌïòÏßÄ ÏïäÎäîÎã§. - ÎßåÏï <link linkend="ini.track-errors">track_errors</link> ÏòµÏÖòÏù¥ Enabledΰú ÎêòÏñ¥ ÏûàÍÝ Ìï¥Î㼠Ψ½ÏûÏóêÏÑú ÏóêÎü¨ÍÄ ÎúÏÉùÌñàÎã§Î©¥, - $php_errormsgÎùºÎäî ÏÝÑÏóÎÄÏàòÏóê ÏóêÎü¨ ΩîÏãúÏßÄÍÄ Îã¥Í¾® Ïûà;å ÎêúÎã§. + 모ë <link linkend="language.expressions">PHP ííì(expression)</link>ì "@"를 ìì ë¶ì´ê³ í¸ì¶ëë©´ error reportingì íì§ ìëë¤. + ë§ì½ <link linkend="ini.track-errors">track_errors</link> ìµì ì´ Enabledë¡ ëì´ ìê³ í´ë¹ 문ì¥ìì ìë¬ê° ë°ìíë¤ë©´, + $php_errormsgë¼ë ì ìë³ìì ìë¬ ë©ìì§ê° ë´ê²¨ ìê² ëë¤. </para> <warning> <para> Index: phpdoc/kr/features/file-upload.xml diff -u phpdoc/kr/features/file-upload.xml:1.1 phpdoc/kr/features/file-upload.xml:1.2 --- phpdoc/kr/features/file-upload.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/file-upload.xml Tue Jan 9 03:27:54 2001 @@ -1,10 +1,8 @@ - <chapter id="features.file-upload"> - <title>Handling file uploads</title> - - <sect1 id="features.file-upload.post-method"> - <title>POST method uploads</title> - - <simpara> +<chapter id="features.file-upload"> + <title>Handling file uploads</title> + <sect1 id="features.file-upload.post-method"> + <title>POST method uploads</title> + <simpara> PHP is capable of receiving file uploads from any RFC-1867 compliant browser (which includes Netscape Navigator 3 or later, Microsoft Internet Explorer 3 with a patch from Microsoft, or @@ -13,75 +11,70 @@ functions, you have full control over who is allowed to upload and what is to be done with the file once it has been uploaded. </simpara> - <para> + <para> Note that PHP also supports PUT-method file uploads as used by - Netscape Composer and W3C's Amaya clients. See the <link - linkend="features.file-upload.put-method">PUT Method + Netscape Composer and W3C's Amaya clients. See the <link linkend="features.file-upload.put-method">PUT Method Support</link> for more details. </para> - <para> + <para> A file upload screen can be built by creating a special form which looks something like this: <example> - <title>File Upload Form</title> - <programlisting> + <title>File Upload Form</title> + <programlisting> <FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> </programlisting> - </example> + </example> The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden field must precede the file input field and its value is the maximum filesize accepted. The value is in bytes. </para> - - <para> + <para> In PHP 3, the following variables will be defined within the - destination script upon a successful upload, assuming that <link - linkend="ini.register-globals">register_globals</link> is turned - on in <filename>php3.ini</filename>. If <link - linkend="ini.track-vars">track_vars</link> is turned on, they will + destination script upon a successful upload, assuming that <link linkend="ini.register-globals">register_globals</link> is turned + on in <filename>php3.ini</filename>. If <link linkend="ini.track-vars">track_vars</link> is turned on, they will also be available in PHP 3 within the global array <varname>$HTTP_POST_VARS</varname>. Note that the following variable names assume the use of the file upload name 'userfile', as used in the example above: <itemizedlist> - <listitem> - <simpara> - <varname>$userfile</varname> - The temporary filename in which + <listitem> + <simpara> + <varname>$userfile</varname> - The temporary filename in which the uploaded file was stored on the server machine. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_name</varname> - The original name or path + </listitem> + <listitem> + <simpara> + <varname>$userfile_name</varname> - The original name or path of the file on the sender's system. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_size</varname> - The size of the uploaded + </listitem> + <listitem> + <simpara> + <varname>$userfile_size</varname> - The size of the uploaded file in bytes. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_type</varname> - The mime type of the file + </listitem> + <listitem> + <simpara> + <varname>$userfile_type</varname> - The mime type of the file if the browser provided this information. An example would be "image/gif". </simpara> - </listitem> - </itemizedlist> + </listitem> + </itemizedlist> Note that the "$userfile" part of the above variables is whatever the name of the INPUT field of TYPE=file is in the upload form. In the above upload form example, we chose to call it "userfile" </para> - - <para> + <para> In PHP 4, the behaviour is slightly different, in that the new global array <varname>$HTTP_POST_FILES</varname> is provided to contain the uploaded file information. This is still only @@ -89,54 +82,59 @@ turned on, but <link linkend="ini.track-vars">track_vars</link> is always turned on in versions of PHP after PHP 4.0.2. </para> - - <para> + <para> The contents of <varname>$HTTP_POST_FILES</varname> are as follows. Note that this assumes the use of the file upload name 'userfile', as used in the example above: <variablelist> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['name']</varname></term> - <listitem> - <para> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['name']</varname> + </term> + <listitem> + <para> The original name of the file on the client machine. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['type']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['type']</varname> + </term> + <listitem> + <para> The mime type of the file, if the browser provided this information. An example would be <literal>"image/gif"</literal>. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['size']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['size']</varname> + </term> + <listitem> + <para> The size, in bytes, of the uploaded file. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['tmp_name']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['tmp_name']</varname> + </term> + <listitem> + <para> The temporary filename of the file in which the uploaded file was stored on the server. </para> - </listitem> - </varlistentry> - </variablelist> - </para> - - <para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> Files will by default be stored in the server's default temporary - directory, unless another location has been given with the <link - linkend="ini.upload-tmp-dir">upload_tmp_dir</link> directive in + directory, unless another location has been given with the <link linkend="ini.upload-tmp-dir">upload_tmp_dir</link> directive in <filename>php.ini</filename>. The server's default directory can be changed by setting the environment variable <envar>TMPDIR</envar> in the environment in which PHP runs. @@ -145,15 +143,15 @@ to make sure that other operations are working on uploaded files, as well. <example> - <title>Validating file uploads</title> - <para> + <title>Validating file uploads</title> + <para> The following examples are for versions of PHP 3 greater than 3.0.16, and versions of PHP 4 greater than 4.0.2. See the function entries for <function>is_uploaded_file</function> and <function>move_uploaded_file</function>. </para> - <programlisting role="php"> -<?php + <programlisting role="php"> +<?php if (is_uploaded_file($userfile)) { copy($userfile, "/place/to/put/uploaded/file"); } else { @@ -163,19 +161,19 @@ move_uploaded_file($userfile, "/place/to/put/uploaded/file"); ?> </programlisting> - <para> + <para> For earlier versions of PHP, you'll need to do something like the following. <note> - <para> + <para> This will <emphasis>not</emphasis> work in versions of PHP 4 after 4.0.2. It depends on internal functionality of PHP which changed after that version. </para> - </note> - </para> - <programlisting role="php"> -<?php + </note> + </para> + <programlisting role="php"> +<?php /* Userland test for uploaded file. */ function is_uploaded_file($filename) { if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { @@ -193,9 +191,9 @@ } ?> </programlisting> - </example> - </para> - <simpara> + </example> + </para> + <simpara> The PHP script which receives the uploaded file should implement whatever logic is necessary for determining what should be done with the uploaded file. You can for example use the @@ -206,49 +204,47 @@ you should either delete the file from the temporary directory or move it elsewhere. </simpara> - <simpara> + <simpara> The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed. </simpara> - </sect1> - - <sect1 id="features.file-upload.common-pitfalls"> - <title>Common Pitfalls</title> - <simpara> + </sect1> + <sect1 id="features.file-upload.common-pitfalls"> + <title>Common Pitfalls</title> + <simpara> The MAX_FILE_SIZE item cannot specify a file size greater than the file size that has been set in the upload_max_filesize in the PHP 3.ini file or the corresponding php3_upload_max_filesize Apache .conf directive. The default is 2 Megabytes. </simpara> - <simpara> + <simpara> Not validating which file you operate on may mean that users can access sensitive information in other directories. </simpara> - <simpara> + <simpara> Please note that the CERN httpd seems to strip off everything starting at the first whitespace in the content-type mime header it gets from the client. As long as this is the case, CERN httpd will not support the file upload feature. </simpara> - </sect1> - - <sect1 id="feature-fileupload.multiple"> - <title>Uploading multiple files</title> - <simpara> + </sect1> + <sect1 id="feature-fileupload.multiple"> + <title>Uploading multiple files</title> + <simpara> It is possible to upload multiple files simultaneously and have the information organized automatically in arrays for you. To do so, you need to use the same array submission syntax in the HTML form as you do with multiple selects and checkboxes: </simpara> - <note> - <para> + <note> + <para> Support for multiple file uploads was added in version 3.0.10. </para> - </note> - <para> - <example> - <title>Uploading multiple files</title> - <programlisting> + </note> + <para> + <example> + <title>Uploading multiple files</title> + <programlisting> <form action="file-upload.php" method="post" enctype="multipart/form-data"> Send these files:<br> <input name="userfile[]" type="file"><br> @@ -256,9 +252,9 @@ <input type="submit" value="Send files"> </form> </programlisting> - </example> - </para> - <simpara> + </example> + </para> + <simpara> When the above form is submitted, the arrays <computeroutput>$userfile</computeroutput>, <computeroutput>$userfile_name</computeroutput>, and @@ -267,7 +263,7 @@ in PHP 3)). Each of these will be a numerically indexed array of the appropriate values for the submitted files. </simpara> - <simpara> + <simpara> For instance, assume that the filenames <filename>/home/test/review.html</filename> and <filename>/home/test/xwp.out</filename> are submitted. In this @@ -279,28 +275,26 @@ <computeroutput>$userfile_size[0]</computeroutput> would contain <filename>review.html</filename>'s filesize, and so forth. </simpara> - <simpara> - <computeroutput>$userfile['name'][0]</computeroutput>, + <simpara> + <computeroutput>$userfile['name'][0]</computeroutput>, <computeroutput>$userfile['tmp_name'][0]</computeroutput>, <computeroutput>$userfile['size'][0]</computeroutput>, and <computeroutput>$userfile['type'][0]</computeroutput> are also set. </simpara> - </sect1> - - <sect1 id="features.file-upload.put-method"> - <title>PUT method support</title> - - <para> + </sect1> + <sect1 id="features.file-upload.put-method"> + <title>PUT method support</title> + <para> PHP provides support for the HTTP PUT method used by clients such as Netscape Composer and W3C Amaya. PUT requests are much simpler than a file upload and they look something like this: <informalexample> - <programlisting> + <programlisting> PUT /path/filename.html HTTP/1.1 </programlisting> - </informalexample> - </para> - <para> + </informalexample> + </para> + <para> This would normally mean that the remote client would like to save the content that follows as: /path/filename.html in your web tree. It is obviously not a good idea for Apache or PHP to automatically @@ -312,33 +306,34 @@ common place is inside a <Directory> block or perhaps inside a <Virtualhost> block. A line like this would do the trick: <informalexample> - <programlisting> + <programlisting> Script PUT /put.php3 </programlisting> - </informalexample> - </para> - <simpara> + </informalexample> + </para> + <simpara> This tells Apache to send all PUT requests for URIs that match the context in which you put this line to the put.php3 script. This assumes, of course, that you have PHP enabled for the .php3 extension and PHP is active. </simpara> - <simpara> + <simpara> Inside your put.php3 file you would then do something like this: </simpara> - <para> - <informalexample><programlisting> + <para> + <informalexample> + <programlisting> <?php copy($PHP_UPLOADED_FILE_NAME,$DOCUMENT_ROOT.$REQUEST_URI); ?> - </programlisting></informalexample> - </para> - <simpara> + </programlisting> + </informalexample> + </para> + <simpara> This would copy the file to the location requested by the remote client. You would probably want to perform some checks and/or authenticate the user before performing this file copy. The only trick here is that when PHP sees a PUT-method request it stores the uploaded file in a temporary file just like those handled but - the <link - linkend="features.file-upload.post-method">POST-method</link>. + the <link linkend="features.file-upload.post-method">POST-method</link>. When the request ends, this temporary file is deleted. So, your PUT handling PHP script has to copy that file somewhere. The filename of this temporary file is in the $PHP_PUT_FILENAME @@ -348,10 +343,8 @@ You do not have to listen to this client. You could, for example, copy all uploaded files to a special uploads directory. </simpara> - </sect1> - - </chapter> - + </sect1> +</chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/kr/features/http-auth.xml diff -u phpdoc/kr/features/http-auth.xml:1.1 phpdoc/kr/features/http-auth.xml:1.2 --- phpdoc/kr/features/http-auth.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/http-auth.xml Tue Jan 9 03:27:54 2001 @@ -1,25 +1,25 @@ <chapter id="features.http-auth"> <title>HTTP authentication with PHP</title> <simpara> - (ÏóÏûêÏ£º. HTTP authenticationÏù¥ÎûÄ Web ClientÏóê;å IDÏôÄ Passwordκ ÏûÖÎÝÎõÏïÑ, - Í ½ IDÏôÄ Passwordΰú WebΨ½ÏÑúÏóê ÏÝëÍ ºÏùÑ ÌóàÍÄ, ÎàÌóàÌïòÎäî ͽÎäÏùÑ ÎßêÌïúÎã§. - ÏûêÏѽÌûà ÏïåÍÝ ÏãÎã§Î©¥ RFC1945Ïùò Authentication ÎÄÎÑÏùÑ Ï½ÍÝÌïòͽ ÎîÎûÄÎã§. - http://pec.etri.re.kr/!qkim/HTTP/Ïóê ÌïúÍ½Ä Î¾àÏó Ψ½ÏÑúÎèÑ ÏûàÏúºÎãà ϽϰÌïòÏûê.) + (ìì주. HTTP authenticationì´ë Web Clientìê² IDì Password를 ì ë ¥ë°ì, + ê·¸ IDì Passwordë¡ Web문ìì ì ê·¼ì íê°, ë¶ííë 기ë¥ì ë§íë¤. + ìì¸í ìê³ ì¶ë¤ë©´ RFC1945ì Authentication ë¶ë¶ì ì°¸ê³ í기 ë°ëë¤. + http://pec.etri.re.kr/!qkim/HTTP/ì íê¸ ë²ì 문ìë ìì¼ë 참조íì.) </simpara> <simpara> - PHPκ ÏǨÏö©Ìïú HTTP Ïù½Ï¶ùÏùÄ Apache ήÎìàΰú ÏǨÏö©ÎêÝ ÎïåÎßå ÎèôÏûëÌïúÎã§. - CGI ξÑÏݺÏóêÏÑúÎäî Ïù¥ ͽÎäÏùÑ ÏǨÏö©ÌïÝ Ïàò ÏóÜÎã§. - Apache ήÎìàÏùò PHP Ïä§ÌŨζÌä½ÏóêÏÑú <function>Header</function>ÎùºÎäî Ìï®Ïàòκ ÏǨÏö©ÌïòΩ¥ - Client νåÎùºÏöÏÝÄÏóê;å Usernameͺ Passwordκ ÏûÖÎÝÎõÎäî ÏúàÎèÑÏöκ ÎùÑÏöÎèÑΰù ÌïòÎäî - "Ïù½Ï¶ù Ïöî͵¨"("Authentication Required") ΩîÏãúÏßÄκ Î¥ÎǺ Ïàò ÏûàÎã§. - ÏùºÎã® ÏǨÏö©ÏûêÍÄ Usernameͺ Passwordκ ÏûÖÎÝÌïòΩ¥, - user name, password, authentication typeÏùò ÍíÏùÑ ÍÄÏßÄÎäî - $PHP_AUTH_USER, $PHP_AUTH_PW, $PHP_AUTH_TYPEÏùò 3ÍúÏùò ÎÄÏàòκ ÍÄÏßÄÍÝ - Ìï¥Îã¼ URL(PHP Ïä§ÌŨζÌä½Îº Ìè¨Ìï®Ìïú)Ïù¥ Îã§Ïãú Îàζ¨ÏõåÏßÑÎã§. - ÌòÑÏû¨ authentication typeÏùÄ "Basic"ÎßåÏù¥ ÏßÄÏõêÎêúÎã§. - ÏûêÏѽÌïú ÏǨÏö©Î¾ïÏùÄ <function>Header</function> Ìï®Ïàòκ ÏÇ¥Ìé¥ Î¥Ïûê.</simpara> + PHP를 ì¬ì©í HTTP ì¸ì¦ì Apache 모ëë¡ ì¬ì©ë ëë§ ëìíë¤. + CGI ë²ì ¼ììë ì´ ê¸°ë¥ì ì¬ì©í ì ìë¤. + Apache 모ëì PHP ì¤í¬ë¦½í¸ìì <function>Header</function>ë¼ë í¨ì를 ì¬ì©íë©´ + Client ë¸ë¼ì°ì ìê² Usernameê³¼ Password를 ì ë ¥ë°ë ìëì°ë¥¼ ëì°ëë¡ íë + "ì¸ì¦ ì구"("Authentication Required") ë©ìì§ë¥¼ ë³´ë¼ ì ìë¤. + ì¼ë¨ ì¬ì©ìê° Usernameê³¼ Password를 ì ë ¥íë©´, + user name, password, authentication typeì ê°ì ê°ì§ë + $PHP_AUTH_USER, $PHP_AUTH_PW, $PHP_AUTH_TYPEì 3ê°ì ë³ì를 ê°ì§ê³ + í´ë¹ URL(PHP ì¤í¬ë¦½í¸ë¥¼ í¬í¨í)ì´ ë¤ì ë¶ë¦¬ìì§ë¤. + íì¬ authentication typeì "Basic"ë§ì´ ì§ìëë¤. + ìì¸í ì¬ì©ë²ì <function>Header</function> í¨ì를 ì´í´ ë³´ì.</simpara> <para> - client authenticationÏùÑ ÏǨÏö©ÌïòÏó¨ Í ½ ÏûÖÎÝÎêú ÍíÏùÑ ÏúÎÝÌïòÎäî ÏòàÏÝúÍÄ ÏïÑÎûòÏóê ÏûàÎã§. : + client authenticationì ì¬ì©íì¬ ê·¸ ì ë ¥ë ê°ì ì¶ë ¥íë ìì ê° ìëì ìë¤. : <example> <title>HTTP Authentication example</title> <programlisting role="php"> @@ -38,29 +38,29 @@ </example> </para> <para> - Ïó¨Îü¨ÎÑÏùÄ $PHP_AUTH_USER ÏôÄ $PHP_AUTH_PWκ Îã®ÏàúÌûà ÏúÎÝÌïòÎäî ÎåÄÏãÝ, - ÏǨÏö©ÏûêÏùò ÏãùÎÑÏùÑ ÏúÑÌï¥ usernameͺ passwordκ ÏǨÏö©Ìïòͽκ ÏõêÌïÝ Í¾ÉÏù¥Îã§. - Ïù¥ÎïåÎäî DatabaseÏóê QueryÌïòͱÎÇò ÏßÅÏÝë dbm ÌååÏùºÏóêÏÑú ÏæÏïÑÎ¥Îäî Îì±Ïùò ΩξïÏúºÎ°ú ÍÄÎäÌïÝ Í¾ÉÏù¥Îã§.</para> + ì¬ë¬ë¶ì $PHP_AUTH_USER ì $PHP_AUTH_PW를 ë¨ìí ì¶ë ¥íë ëì , + ì¬ì©ìì ìë³ì ìí´ usernameê³¼ password를 ì¬ì©í기를 ìí ê²ì´ë¤. + ì´ëë Databaseì Queryíê±°ë ì§ì dbm íì¼ìì ì°¾ìë³´ë ë±ì ë°©ë²ì¼ë¡ ê°ë¥í ê²ì´ë¤.</para> <para> - Internet Explorer browserÏóêÏÑúÎäî ξÑÍ ½Î°ú Ïù½Ìï¥ HeaderÏùò ÏàúÏÑúÍÄ Îß§Ïö ͼåÎã§Î°Îã§. - <emphasis>WWW-Authenticate</emphasis>κ - <errorcode>HTTP/1.0 401</errorcode>Î¥Î㧠ήºÏÝÄ Î¥ÎÇ¥Îäî ;ÉÏù¥ ÌòÑÏû¨ ÍÄÎäÌïú Ìä½Î¶ÏúºÎ°ú Î¥Ïù½Îã§. + Internet Explorer browserììë ë²ê·¸ë¡ ì¸í´ Headerì ììê° ë§¤ì° ê¹ë¤ë¡ë¤. + <emphasis>WWW-Authenticate</emphasis>를 + <errorcode>HTTP/1.0 401</errorcode>ë³´ë¤ ë¨¼ì ë³´ë´ë ê²ì´ íì¬ ê°ë¥í í¸ë¦ì¼ë¡ ë³´ì¸ë¤. </para> <simpara> - μÑÎÄξàÌò½Ïùò ÏúÝÏúÏùÑ ÏöÎݧÌïòÏó¨ HTTPÏóêÏÑú ÏÝú͵ÌïòÎäî Ïù½Ï¶ùÏùÑ ÏǨÏö©ÌïòÎäî ÎåÄÏãÝ - ͽϰ¥Ïùò Ïô½ÎÄ Î©îϼ¥Îãà϶òÏùÑ ÏǨÏö©ÌïÝ Í¾ÏöÏóêÎäî ΨºÎ°Ý PHP_AUTH ÎÄÏàòÎäî ÏѧÏÝïÎêòÏßÄ ÏïäÎäîÎã§. - Ïù¥Îü;Ïö externally-authenticated userκ ÌôïÏù½Ìïòͽ ÏúÑÌï¥ $REMOTE_USER ÎÄÏàòκ ÏǨÏö©ÌïÝ Ïàò ÏûàÎã§. + ë¹ë°ë²í¸ì ì ì¶ì ì°ë ¤íì¬ HTTPìì ì ê³µíë ì¸ì¦ì ì¬ì©íë ëì + 기존ì ì¸ë¶ ë©ì¹´ëì¦ì ì¬ì©í ê²½ì°ìë ë¬¼ë¡ PHP_AUTH ë³ìë ì¤ì ëì§ ìëë¤. + ì´ë°ê²½ì° externally-authenticated user를 íì¸í기 ìí´ $REMOTE_USER ë³ì를 ì¬ì©í ì ìë¤. </simpara> <simpara> - ÏúÝÏùòÌïÝ ÏÝêÏùÄ Ïù½Ï¶ùÏù¥ ÌïÑÏöîÌïú ÌéòÏù¥ÏßÄÏôÄ Ïù½Ï¶ùÏù¥ ÌïÑÏöîÏóÜÎäî ÌéòÏù¥ÏßÄÍÄ ÍôÏùÄ ÏÑúξÑÏÉÅÏóê ϰ¥Ïû¨ÌïÝ Îïå, - Ïù½Ï¶ùÏù¥ ÌïÑÏöîÏóÜÎäî URLÏùÑ controlÌïÝ Ïàò ÏûàÎäî ÎàÑ͵ÍÄÍÄ, - Ïù½Ï¶ùÏù¥ ÌïÑÏöîÌïú URLÏùò ÏïîÌò½Îº ÌõîÏêÎ¥Îäî ;ÉÏùÄ ÎßâÏùÑ Ïàò ÏóÜÎã§Îäî ÏÝêÏù¥Îã§. + ì ìí ì ì ì¸ì¦ì´ íìí íì´ì§ì ì¸ì¦ì´ íììë íì´ì§ê° ê°ì ìë²ìì ì¡´ì¬í ë, + ì¸ì¦ì´ íììë URLì controlí ì ìë ëêµ°ê°ê°, + ì¸ì¦ì´ íìí URLì ìí¸ë¥¼ íì³ë³´ë ê²ì ë§ì ì ìë¤ë ì ì´ë¤. </simpara> <simpara> - NetscapeÏôÄ Internet Explorer ήÎëê 401ÏùëÎãµ ÏîÎìúκ ÏÑúξÑÏóêÏÑú Îõ;åÎêòΩ¥ - local browser windowÏùò authentication cacheκ clearÌïúÎã§. - ϶â, Ïù¥Í¾ÉÏùÄ "log out"ÍúÎÖêÏù¥ ÎêòÎäî ;ÉÏúºÎ°ú, ÏǨÏö©ÏûêÎì§Î°ú ÌïòÏó¨Í½à usernameͺ ÏïîÌò½Îº Îã§Ïãú ÏûÖÎÝÌïò;å ÌïúÎã§. - ÏùºÎÄÎäî Ïù¥Í¾ÉÏùÑ ÌܵÌï¥ loginÏùò "time out"Ïù¥ÎÇò "log-out"ξÑÌäºÏùÑ ÎßåÎìúÎäîÎç ÏǨÏö©ÌïúÎã§ + Netscapeì Internet Explorer 모ë 401ìëµ ì½ë를 ìë²ìì ë°ê²ëë©´ + local browser windowì authentication cache를 clearíë¤. + ì¦, ì´ê²ì "log out"ê°ë ì´ ëë ê²ì¼ë¡, ì¬ì©ìë¤ë¡ íì¬ê¸ usernameê³¼ ìí¸ë¥¼ ë¤ì ì ë ¥íê² íë¤. + ì¼ë¶ë ì´ê²ì íµí´ loginì "time out"ì´ë "log-out"ë²í¼ì ë§ëëë° ì¬ì©íë¤ </simpara> <example> <title>HTTP Authentication example forcing a new name/password</title> @@ -90,12 +90,12 @@ </programlisting> </example> <simpara> - Í ½Îü¨ÎÇò Ïù¥ ÎèôÏûëÏùÄ HTTP Basic authentication ͽϧÄÏóê Î¥ÏûÎêú ;ÉÏùÄ ÏïÑÎãàÎØÄΰú Ïù¥ ͽÎäÏóê Ïùòϰ¥ÌïòÏó¨ÏÑúÎäî ÏïàÎêúÎã§. - LynxÏóêÏÑúÎäî 401 ÏÑúÎ¾Ñ ÏùëÎãµÏùÑ ÎõÏïÑÎèÑ authentication ÏÝïΥκ clearÌïòÏßÄ ÏïäÎäîÎã§. - ÎîÎùºÏÑú BackÏùÑ ÎàÑÎ¥ÍÝ Îã§Ïãú Forward ξÑÌäºÏùÑ ÎàåÎü¨ÏÑú Îã§Ïãú ÏÝëÍ ºÌïÝ Ïàò ÏûàÎã§.</simpara> + ê·¸ë¬ë ì´ ëìì HTTP Basic authentication 기ì¤ì ë³´ì¥ë ê²ì ìëë¯ë¡ ì´ ê¸°ë¥ì ìì¡´íì¬ìë ìëë¤. + Lynxììë 401 ìë² ìëµì ë°ìë authentication ì 보를 clearíì§ ìëë¤. + ë°ë¼ì Backì ëë¥´ê³ ë¤ì Forward ë²í¼ì ëë¬ì ë¤ì ì ê·¼í ì ìë¤.</simpara> <simpara> - ÎòêÌïú Ïù¥ Authentication ͽÎäÏùÄ Microsoft's IIS serverÏóêÏÑú - CGI versionÏùò PHPκ ÏǨÏö©ÌïÝ Í¾ÏöÏóêÎäî IISÏùò ÏÝúÏïÏúºÎ°úÏù½Ìï¥ ÎèôÏûëÌïòÏßÄ ÏïäÎäîÎã§. + ëí ì´ Authentication 기ë¥ì Microsoft's IIS serverìì + CGI versionì PHP를 ì¬ì©í ê²½ì°ìë IISì ì ì½ì¼ë¡ì¸í´ ëìíì§ ìëë¤. </simpara> </chapter> <!-- Keep this comment at the end of the file Index: phpdoc/kr/features/images.xml diff -u phpdoc/kr/features/images.xml:1.1 phpdoc/kr/features/images.xml:1.2 --- phpdoc/kr/features/images.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/images.xml Tue Jan 9 03:27:54 2001 @@ -1,12 +1,12 @@ <chapter id="features.images"> - <title>PHPÏóêÏÑú Ïù¥ÎؽÏßÄ ÏÉùÏѱͺ ÏàòÏÝï(Creating and manipulating images)</title> + <title>PHPìì ì´ë¯¸ì§ ìì±ê³¼ ìì (Creating and manipulating images)</title> <simpara> - PHPÎäî Îã®ÏßÄ HTMLÏúÎÝÏùÑ ÎßåÎìúÎäî ;ÉÎßå ÌïÝ Ïàò ÏûàÎäî ;ÉÏù¥ ÏïÑÎãàÎã§. - PHPÎäî GIF image fileÎèÑ ÎßåÎì§ Ïàò ÏûàÏùÑ ÏûàÏùÑ ÎøêÏïÑÎãàÎùº, - ÏǨÏö©ÌïòͽÏóê Ìé½Î¶¨Ìïú GIF image streamͼåÏßÄ ÎßåÎì§ Ïàò ÏûàÎã§. - Ïù¥Îº ÏúÑÌï¥ÏÑú Ïó¨Îü¨ÎÑÏùÄ PHPκ Ϫ¥ÌååÏùº ÌïÝ Îïå, image Ìï®Ïàòκ ÍÄÏßÄÍÝ ÏûàÎäî GD ÎùºÏù¥Î½åÎü¨Î¶¨Îº Ìè¨Ìï®ÌïòÏó¨Ïïº ÌïúÎã§. - GDÏôÄ PHPÎäî ÏǨÏö©ÌïòÎäî Ïù¥ÎؽÏßÄ Ìè¨Îß ÌòïÌÉúÏóê ÎîÎùº Îã§Î½ ÎùºÏù¥Î½åÎü¨Î¶¨ÎèÑ Ïöî͵¨ÌïúÎã§. - GDÎäî ξÑÏÝÑ 1.6ÎÄÌÑ GIF Ïù¥ÎؽÏßÄ ÏßÄÏõêÏùÑ ÌïòÏßÄ ÏïäÎäîÎã§. + PHPë ë¨ì§ HTMLì¶ë ¥ì ë§ëë ê²ë§ í ì ìë ê²ì´ ìëë¤. + PHPë GIF image fileë ë§ë¤ ì ìì ìì ë¿ìëë¼, + ì¬ì©í기ì í¸ë¦¬í GIF image streamê¹ì§ ë§ë¤ ì ìë¤. + ì´ë¥¼ ìí´ì ì¬ë¬ë¶ì PHP를 ì»´íì¼ í ë, image í¨ì를 ê°ì§ê³ ìë GD ë¼ì´ë¸ë¬ë¦¬ë¥¼ í¬í¨íì¬ì¼ íë¤. + GDì PHPë ì¬ì©íë ì´ë¯¸ì§ í¬ë§· ííì ë°ë¼ ë¤ë¥¸ ë¼ì´ë¸ë¬ë¦¬ë ì구íë¤. + GDë ë²ì 1.6ë¶í° GIF ì´ë¯¸ì§ ì§ìì íì§ ìëë¤. </simpara> <para> <example> @@ -24,11 +24,11 @@ ?> </programlisting> </example> - ÏúÑÏùò ÏòàÏÝúÎäî <img src="button.php?text"> ÏôÄ ÍôÏùÄ tagÏù¥ ÏûàÎäî ÌéòÏù¥ÏßÄΰúÎÄÌÑ ÎàÎݧÏßÄ;å ÎêÝ Í¾ÉÏù¥Îã§. - Í ½Îü¨Î©¥ ÏúÑÏóêÏûàÎäî button.php Ïä§ÌŨζÌä½Îäî "text"ÎùºÎäî Ψ½ÏûêÏó¥ÏùÑ - "images/button1.gif"Ïóê Ïò§Î¾ÑÎÝàÏù¥ ÏãúϺú ;ͺ imageÏóê ÏúÎÝÌïúÎã§. - Ïù¥ÎÝá;å ÌïòΩ¥ ξÑÌäºÏóê Îì§Ïñ¥ÍÄÎäî ͽÄÏî®Îº Îߧξà ÏÜêÏâ;å ÎîÍøî Ïì½ Ïàò ÏûàÍÝ, - ÎòêÌïú Îߧξà Ïù¥ÎؽÏßÄ ÌååÏùºÏùÑ ÎßåÎì§ ÌïÑÏöîÍÄ ÏóÜÏñ¥ Ìö®Ïú®ÏÝÅÏù¥ÍÝ ÍÑÎã®ÌïòÎã§. + ìì ìì ë <img src="button.php?text"> ì ê°ì tagì´ ìë íì´ì§ë¡ë¶í° ë¶ë ¤ì§ê² ë ê²ì´ë¤. + ê·¸ë¬ë©´ ìììë button.php ì¤í¬ë¦½í¸ë "text"ë¼ë 문ìì´ì + "images/button1.gif"ì ì¤ë²ë ì´ ìì¼ ê²°ê³¼ imageì ì¶ë ¥íë¤. + ì´ë ê² íë©´ ë²í¼ì ë¤ì´ê°ë ê¸ì¨ë¥¼ ë§¤ë² ìì½ê² ë°ê¿ ì¸ ì ìê³ , + ëí ë§¤ë² ì´ë¯¸ì§ íì¼ì ë§ë¤ íìê° ìì´ í¨ì¨ì ì´ê³ ê°ë¨íë¤. </para> </chapter> <!-- Keep this comment at the end of the file
Index: phpdoc/kr/features/cookies.xml diff -u phpdoc/kr/features/cookies.xml:1.1 phpdoc/kr/features/cookies.xml:1.2 --- phpdoc/kr/features/cookies.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/cookies.xml Tue Jan 9 03:27:54 2001 @@ -1,17 +1,17 @@ <chapter id="features.cookies"> <title>Cookies</title> <para> - PHPÎäî HTTP Cookieκ Ìà¨ÎÖÌïò;å(transparently) ÏßÄÏõêÌïúÎã§. - Cookie Ωîϼ¥Îãà϶òÏùÄ Ìä½ÎûòÌǼÏù¥ÎÇò ÏǨÏö©Ïûê ÏãùÎÑ Îì±ÏùÑ ÏúÑÌï¥ Ïõê;© browserÏóê - ÏÝÄÏûÎêú ÎçÏù¥ÌÑκ ÎèåÎݧ ÎõÎäî ͺÏÝïÏùÑ ÎßêÌïúÎã§. - Ïó¨Îü¨ÎÑÏùÄ cookieκ ÏѧÏÝïÌïòͽ ÏúÑÌï¥ <function>setcookie</function> Ìï®Ïàòκ ÏǨÏö©ÌïÝ Ïàò ÏûàÎã§. - CookieÎäî HTTP Ìó§ÎçîÏùò Ìïú ÎÄÎÑÏù¥ÎØÄΰú, <function>setcookie</function> Ìï®ÏàòÎäî νåÎùºÏöÏÝÄΰú - Î¥ÎÇ¥Îäî Ïñ¥Îñ§ ÎçÏù¥ÌÑÎ¥Îã§ÎèÑ ÏïûÏóê ÏǨÏö©Ìï¥Ïïº ÌïúÎã§. - Ïù¥ ÏÝúÏïÏùÄ <function>header</function> Ìï®ÏàòÏôÄ ÍôÏùÄ ÏÝúÏïÏúºÎ°ú ΥΩ¥ ÎêúÎã§.</para> + PHPë HTTP Cookie를 í¬ëª íê²(transparently) ì§ìíë¤. + Cookie ë©ì¹´ëì¦ì í¸ëí¹ì´ë ì¬ì©ì ìë³ ë±ì ìí´ ì격 browserì + ì ì¥ë ë°ì´í°ë¥¼ ëë ¤ ë°ë ê³¼ì ì ë§íë¤. + ì¬ë¬ë¶ì cookie를 ì¤ì í기 ìí´ <function>setcookie</function> í¨ì를 ì¬ì©í ì ìë¤. + Cookieë HTTP í¤ëì í ë¶ë¶ì´ë¯ë¡, <function>setcookie</function> í¨ìë ë¸ë¼ì°ì ë¡ + ë³´ë´ë ì´ë¤ ë°ì´í°ë³´ë¤ë ìì ì¬ì©í´ì¼ íë¤. + ì´ ì ì½ì <function>header</function> í¨ìì ê°ì ì ì½ì¼ë¡ ë³´ë©´ ëë¤.</para> <para> - ÌÅ¥ÎùºÏù¥Ïñ½Ìä½ÍÄ Î¥ÎÇ¥Ï§Ä Î®ÎìÝ cookieÎäî ÏûêÎèôÏÝÅÏúºÎ°ú GETÏù¥ÎÇò POST ΩÏãù ÎçÏù¥ÌÑÏôÄ ÍôÏùÄ PHP ÎÄÏàòΰú ÎÄÌôòÎêúÎã§. - ÎßåÏï Ïó¨Îü¨ÎÑÏù¥ ÎèôÏùºÌïú cookieÏóê Ïó¨Îü¨ ÍíÏùÑ ÏÝÄÏûÌïòÍÝ ÏãÎã§Î©¥ CookieÏù¥Î¶ÑÏóê <emphasis>[]</emphasis>κ ÎçîÌïòΩ¥ ÎêúÎã§. - ÏûêÏѽÌïú ;ÉÏùÄ <function>setcookie</function> Ìï®Ïàò ÏѧÎÖÏùÑ Ï½Ï°ÌïòÏûê. + í´ë¼ì´ì¸í¸ê° ë³´ë´ì¤ 모ë cookieë ìëì ì¼ë¡ GETì´ë POST ë°©ì ë°ì´í°ì ê°ì PHP ë³ìë¡ ë³íëë¤. + ë§ì½ ì¬ë¬ë¶ì´ ëì¼í cookieì ì¬ë¬ ê°ì ì ì¥íê³ ì¶ë¤ë©´ Cookieì´ë¦ì <emphasis>[]</emphasis>를 ëíë©´ ëë¤. + ìì¸í ê²ì <function>setcookie</function> í¨ì ì¤ëª ì 참조íì. </para> </chapter> <!-- Keep this comment at the end of the file Index: phpdoc/kr/features/error-handling.xml diff -u phpdoc/kr/features/error-handling.xml:1.1 phpdoc/kr/features/error-handling.xml:1.2 --- phpdoc/kr/features/error-handling.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/error-handling.xml Tue Jan 9 03:27:54 2001 @@ -1,7 +1,7 @@ <chapter id="features.error-handling"> <title>Error Handling</title> <para> - PHPÏóêÎäî Îã§Ïùåͺ ÍôÏùÄ Ïó¨Îü¨ ÏóêÎü¨ÏôÄ Í¾ÍÝ ÌòïÌÉúÍÄ ÏûàÎã§.: + PHPìë ë¤ìê³¼ ê°ì ì¬ë¬ ìë¬ì ê²½ê³ ííê° ìë¤.: <table> <title>PHP error types</title> <tgroup cols="4"> @@ -17,26 +17,26 @@ <row> <entry>1</entry> <entry>E_ERROR</entry> - <entry>Normal Function Errors (ÏùºÎòÏÝÅÏù½ ÏóêÎü¨)</entry> + <entry>Normal Function Errors (ì¼ë°ì ì¸ ìë¬)</entry> <entry/> </row> <row> <entry>2</entry> <entry>E_WARNING</entry> - <entry>Normal Warnings (ÏùºÎòÏÝÅÏù½ ;ÍÝ)</entry> + <entry>Normal Warnings (ì¼ë°ì ì¸ ê²½ê³ )</entry> <entry/> </row> <row> <entry>4</entry> <entry>E_PARSE</entry> - <entry>Parser Errors (Ψ½Î¾ï ÏóêÎü¨)</entry> + <entry>Parser Errors (ë¬¸ë² ìë¬)</entry> <entry/> </row> <row> <entry>8</entry> <entry>E_NOTICE </entry> <entry> - Notices (Ψ¥ÏãúÌïÝ Ïàò ÏûàÎäî ÏïåζºÏù¥ÏßÄÎßå ξÑÍ ½Ïùò ÍÄÎäÏѱÏùÑ ÍÄÏßÄÍÝ ÏûàÎäî ;Ïö) + Notices (무ìí ì ìë ì림ì´ì§ë§ ë²ê·¸ì ê°ë¥ì±ì ê°ì§ê³ ìë ê²½ì°) </entry> <entry/> </row> @@ -44,50 +44,50 @@ <entry>16</entry> <entry>E_CORE_ERROR</entry> <entry>fatal errors that occur during PHP's initial startup - (PHPÍÄ Ï¾òÏùå ÏãúÏûëÎêÝ Îïå ÎúÏÉùÌïú ϼòÎÖÏÝÅ ÏóêÎü¨)</entry> + (PHPê° ì²ì ììë ë ë°ìí ì¹ëª ì ìë¬)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>32</entry> <entry>E_CORE_WARNING</entry> <entry>warnings (non fatal errors) that occur during PHP's initial startup - (PHPÍÄ Ï¾òÏùå ÏãúÏûëÎêÝ Îïå ÎúÏÉùÌïú ϼòÎÖÏÝÅÏù¥ÏßÄ ÏïäÏùÄ Í¾ÍÝ)</entry> + (PHPê° ì²ì ììë ë ë°ìí ì¹ëª ì ì´ì§ ìì ê²½ê³ )</entry> <entry>PHP 4 only</entry> </row> <row> <entry>64</entry> <entry>E_COMPILE_ERROR</entry> - <entry>fatal compile-time errors (Ϫ¥ÌååÏùºÏãú ÏÉùͽ¥ ϼòÎÖÏÝÅ ÏóêÎü¨)</entry> + <entry>fatal compile-time errors (ì»´íì¼ì ì긴 ì¹ëª ì ìë¬)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>128</entry> <entry>E_COMPILE_WARNING</entry> - <entry>compile-time warnings (non fatal errors) (Ϫ¥ÌååÏùºÏãú ÎúÏÉùÌïú ϼòÎÖÏÝÅÏù¥ÏßÄ ÏïäÏùÄ Í¾ÍÝ)</entry> + <entry>compile-time warnings (non fatal errors) (ì»´íì¼ì ë°ìí ì¹ëª ì ì´ì§ ìì ê²½ê³ )</entry> <entry>PHP 4 only</entry> </row> <row> <entry>256</entry> <entry>E_USER_ERROR</entry> - <entry>user-generated error message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ ÏóêÎü¨ ΩîÏѽÏßÄ)</entry> + <entry>user-generated error message (ì¬ì©ìê° ë§ë ìë¬ ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>512</entry> <entry>E_USER_WARNING</entry> - <entry>user-generated warning message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ Í¾ÍÝ Î©îÏѽÏßÄ)</entry> + <entry>user-generated warning message (ì¬ì©ìê° ë§ë ê²½ê³ ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry>1024</entry> <entry>E_USER_NOTICE </entry> - <entry>user-generated notice message (ÏǨÏö©ÏûêÍÄ ÎßåÎìÝ Ïïåζº ΩîÏѽÏßÄ)</entry> + <entry>user-generated notice message (ì¬ì©ìê° ë§ë ì림 ë©ì¸ì§)</entry> <entry>PHP 4 only</entry> </row> <row> <entry/> <entry>E_ALL</entry> - <entry>all of the above, as supported (ÏßÄÏõêÍÄÎäÌïú ÏúÑÏùò Í¾É Î®Îëê)</entry> + <entry>all of the above, as supported (ì§ìê°ë¥í ìì ê² ëª¨ë)</entry> <entry/> </row> </tbody> @@ -130,9 +130,9 @@ </para> </warning> <para> - ήÎìÝ <link linkend="language.expressions">PHP ÌëúÌòÑÏãù(expression)</link>ÏùÄ "@"κ ÏïûÏóê ÎôÏù¥ÍÝ Ìò½ÏúÎêòΩ¥ error reportingÏùÑ ÌïòÏßÄ ÏïäÎäîÎã§. - ÎßåÏï <link linkend="ini.track-errors">track_errors</link> ÏòµÏÖòÏù¥ Enabledΰú ÎêòÏñ¥ ÏûàÍÝ Ìï¥Î㼠Ψ½ÏûÏóêÏÑú ÏóêÎü¨ÍÄ ÎúÏÉùÌñàÎã§Î©¥, - $php_errormsgÎùºÎäî ÏÝÑÏóÎÄÏàòÏóê ÏóêÎü¨ ΩîÏãúÏßÄÍÄ Îã¥Í¾® Ïûà;å ÎêúÎã§. + 모ë <link linkend="language.expressions">PHP ííì(expression)</link>ì "@"를 ìì ë¶ì´ê³ í¸ì¶ëë©´ error reportingì íì§ ìëë¤. + ë§ì½ <link linkend="ini.track-errors">track_errors</link> ìµì ì´ Enabledë¡ ëì´ ìê³ í´ë¹ 문ì¥ìì ìë¬ê° ë°ìíë¤ë©´, + $php_errormsgë¼ë ì ìë³ìì ìë¬ ë©ìì§ê° ë´ê²¨ ìê² ëë¤. </para> <warning> <para> Index: phpdoc/kr/features/file-upload.xml diff -u phpdoc/kr/features/file-upload.xml:1.1 phpdoc/kr/features/file-upload.xml:1.2 --- phpdoc/kr/features/file-upload.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/file-upload.xml Tue Jan 9 03:27:54 2001 @@ -1,10 +1,8 @@ - <chapter id="features.file-upload"> - <title>Handling file uploads</title> - - <sect1 id="features.file-upload.post-method"> - <title>POST method uploads</title> - - <simpara> +<chapter id="features.file-upload"> + <title>Handling file uploads</title> + <sect1 id="features.file-upload.post-method"> + <title>POST method uploads</title> + <simpara> PHP is capable of receiving file uploads from any RFC-1867 compliant browser (which includes Netscape Navigator 3 or later, Microsoft Internet Explorer 3 with a patch from Microsoft, or @@ -13,75 +11,70 @@ functions, you have full control over who is allowed to upload and what is to be done with the file once it has been uploaded. </simpara> - <para> + <para> Note that PHP also supports PUT-method file uploads as used by - Netscape Composer and W3C's Amaya clients. See the <link - linkend="features.file-upload.put-method">PUT Method + Netscape Composer and W3C's Amaya clients. See the <link linkend="features.file-upload.put-method">PUT Method Support</link> for more details. </para> - <para> + <para> A file upload screen can be built by creating a special form which looks something like this: <example> - <title>File Upload Form</title> - <programlisting> + <title>File Upload Form</title> + <programlisting> <FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST> <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000"> Send this file: <INPUT NAME="userfile" TYPE="file"> <INPUT TYPE="submit" VALUE="Send File"> </FORM> </programlisting> - </example> + </example> The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden field must precede the file input field and its value is the maximum filesize accepted. The value is in bytes. </para> - - <para> + <para> In PHP 3, the following variables will be defined within the - destination script upon a successful upload, assuming that <link - linkend="ini.register-globals">register_globals</link> is turned - on in <filename>php3.ini</filename>. If <link - linkend="ini.track-vars">track_vars</link> is turned on, they will + destination script upon a successful upload, assuming that <link linkend="ini.register-globals">register_globals</link> is turned + on in <filename>php3.ini</filename>. If <link linkend="ini.track-vars">track_vars</link> is turned on, they will also be available in PHP 3 within the global array <varname>$HTTP_POST_VARS</varname>. Note that the following variable names assume the use of the file upload name 'userfile', as used in the example above: <itemizedlist> - <listitem> - <simpara> - <varname>$userfile</varname> - The temporary filename in which + <listitem> + <simpara> + <varname>$userfile</varname> - The temporary filename in which the uploaded file was stored on the server machine. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_name</varname> - The original name or path + </listitem> + <listitem> + <simpara> + <varname>$userfile_name</varname> - The original name or path of the file on the sender's system. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_size</varname> - The size of the uploaded + </listitem> + <listitem> + <simpara> + <varname>$userfile_size</varname> - The size of the uploaded file in bytes. </simpara> - </listitem> - <listitem> - <simpara> - <varname>$userfile_type</varname> - The mime type of the file + </listitem> + <listitem> + <simpara> + <varname>$userfile_type</varname> - The mime type of the file if the browser provided this information. An example would be "image/gif". </simpara> - </listitem> - </itemizedlist> + </listitem> + </itemizedlist> Note that the "$userfile" part of the above variables is whatever the name of the INPUT field of TYPE=file is in the upload form. In the above upload form example, we chose to call it "userfile" </para> - - <para> + <para> In PHP 4, the behaviour is slightly different, in that the new global array <varname>$HTTP_POST_FILES</varname> is provided to contain the uploaded file information. This is still only @@ -89,54 +82,59 @@ turned on, but <link linkend="ini.track-vars">track_vars</link> is always turned on in versions of PHP after PHP 4.0.2. </para> - - <para> + <para> The contents of <varname>$HTTP_POST_FILES</varname> are as follows. Note that this assumes the use of the file upload name 'userfile', as used in the example above: <variablelist> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['name']</varname></term> - <listitem> - <para> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['name']</varname> + </term> + <listitem> + <para> The original name of the file on the client machine. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['type']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['type']</varname> + </term> + <listitem> + <para> The mime type of the file, if the browser provided this information. An example would be <literal>"image/gif"</literal>. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['size']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['size']</varname> + </term> + <listitem> + <para> The size, in bytes, of the uploaded file. </para> - </listitem> - </varlistentry> - <varlistentry> - <term><varname>$HTTP_POST_FILES['userfile']['tmp_name']</varname></term> - <listitem> - <para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <varname>$HTTP_POST_FILES['userfile']['tmp_name']</varname> + </term> + <listitem> + <para> The temporary filename of the file in which the uploaded file was stored on the server. </para> - </listitem> - </varlistentry> - </variablelist> - </para> - - <para> + </listitem> + </varlistentry> + </variablelist> + </para> + <para> Files will by default be stored in the server's default temporary - directory, unless another location has been given with the <link - linkend="ini.upload-tmp-dir">upload_tmp_dir</link> directive in + directory, unless another location has been given with the <link linkend="ini.upload-tmp-dir">upload_tmp_dir</link> directive in <filename>php.ini</filename>. The server's default directory can be changed by setting the environment variable <envar>TMPDIR</envar> in the environment in which PHP runs. @@ -145,15 +143,15 @@ to make sure that other operations are working on uploaded files, as well. <example> - <title>Validating file uploads</title> - <para> + <title>Validating file uploads</title> + <para> The following examples are for versions of PHP 3 greater than 3.0.16, and versions of PHP 4 greater than 4.0.2. See the function entries for <function>is_uploaded_file</function> and <function>move_uploaded_file</function>. </para> - <programlisting role="php"> -<?php + <programlisting role="php"> +<?php if (is_uploaded_file($userfile)) { copy($userfile, "/place/to/put/uploaded/file"); } else { @@ -163,19 +161,19 @@ move_uploaded_file($userfile, "/place/to/put/uploaded/file"); ?> </programlisting> - <para> + <para> For earlier versions of PHP, you'll need to do something like the following. <note> - <para> + <para> This will <emphasis>not</emphasis> work in versions of PHP 4 after 4.0.2. It depends on internal functionality of PHP which changed after that version. </para> - </note> - </para> - <programlisting role="php"> -<?php + </note> + </para> + <programlisting role="php"> +<?php /* Userland test for uploaded file. */ function is_uploaded_file($filename) { if (!$tmp_file = get_cfg_var('upload_tmp_dir')) { @@ -193,9 +191,9 @@ } ?> </programlisting> - </example> - </para> - <simpara> + </example> + </para> + <simpara> The PHP script which receives the uploaded file should implement whatever logic is necessary for determining what should be done with the uploaded file. You can for example use the @@ -206,49 +204,47 @@ you should either delete the file from the temporary directory or move it elsewhere. </simpara> - <simpara> + <simpara> The file will be deleted from the temporary directory at the end of the request if it has not been moved away or renamed. </simpara> - </sect1> - - <sect1 id="features.file-upload.common-pitfalls"> - <title>Common Pitfalls</title> - <simpara> + </sect1> + <sect1 id="features.file-upload.common-pitfalls"> + <title>Common Pitfalls</title> + <simpara> The MAX_FILE_SIZE item cannot specify a file size greater than the file size that has been set in the upload_max_filesize in the PHP 3.ini file or the corresponding php3_upload_max_filesize Apache .conf directive. The default is 2 Megabytes. </simpara> - <simpara> + <simpara> Not validating which file you operate on may mean that users can access sensitive information in other directories. </simpara> - <simpara> + <simpara> Please note that the CERN httpd seems to strip off everything starting at the first whitespace in the content-type mime header it gets from the client. As long as this is the case, CERN httpd will not support the file upload feature. </simpara> - </sect1> - - <sect1 id="feature-fileupload.multiple"> - <title>Uploading multiple files</title> - <simpara> + </sect1> + <sect1 id="feature-fileupload.multiple"> + <title>Uploading multiple files</title> + <simpara> It is possible to upload multiple files simultaneously and have the information organized automatically in arrays for you. To do so, you need to use the same array submission syntax in the HTML form as you do with multiple selects and checkboxes: </simpara> - <note> - <para> + <note> + <para> Support for multiple file uploads was added in version 3.0.10. </para> - </note> - <para> - <example> - <title>Uploading multiple files</title> - <programlisting> + </note> + <para> + <example> + <title>Uploading multiple files</title> + <programlisting> <form action="file-upload.php" method="post" enctype="multipart/form-data"> Send these files:<br> <input name="userfile[]" type="file"><br> @@ -256,9 +252,9 @@ <input type="submit" value="Send files"> </form> </programlisting> - </example> - </para> - <simpara> + </example> + </para> + <simpara> When the above form is submitted, the arrays <computeroutput>$userfile</computeroutput>, <computeroutput>$userfile_name</computeroutput>, and @@ -267,7 +263,7 @@ in PHP 3)). Each of these will be a numerically indexed array of the appropriate values for the submitted files. </simpara> - <simpara> + <simpara> For instance, assume that the filenames <filename>/home/test/review.html</filename> and <filename>/home/test/xwp.out</filename> are submitted. In this @@ -279,28 +275,26 @@ <computeroutput>$userfile_size[0]</computeroutput> would contain <filename>review.html</filename>'s filesize, and so forth. </simpara> - <simpara> - <computeroutput>$userfile['name'][0]</computeroutput>, + <simpara> + <computeroutput>$userfile['name'][0]</computeroutput>, <computeroutput>$userfile['tmp_name'][0]</computeroutput>, <computeroutput>$userfile['size'][0]</computeroutput>, and <computeroutput>$userfile['type'][0]</computeroutput> are also set. </simpara> - </sect1> - - <sect1 id="features.file-upload.put-method"> - <title>PUT method support</title> - - <para> + </sect1> + <sect1 id="features.file-upload.put-method"> + <title>PUT method support</title> + <para> PHP provides support for the HTTP PUT method used by clients such as Netscape Composer and W3C Amaya. PUT requests are much simpler than a file upload and they look something like this: <informalexample> - <programlisting> + <programlisting> PUT /path/filename.html HTTP/1.1 </programlisting> - </informalexample> - </para> - <para> + </informalexample> + </para> + <para> This would normally mean that the remote client would like to save the content that follows as: /path/filename.html in your web tree. It is obviously not a good idea for Apache or PHP to automatically @@ -312,33 +306,34 @@ common place is inside a <Directory> block or perhaps inside a <Virtualhost> block. A line like this would do the trick: <informalexample> - <programlisting> + <programlisting> Script PUT /put.php3 </programlisting> - </informalexample> - </para> - <simpara> + </informalexample> + </para> + <simpara> This tells Apache to send all PUT requests for URIs that match the context in which you put this line to the put.php3 script. This assumes, of course, that you have PHP enabled for the .php3 extension and PHP is active. </simpara> - <simpara> + <simpara> Inside your put.php3 file you would then do something like this: </simpara> - <para> - <informalexample><programlisting> + <para> + <informalexample> + <programlisting> <?php copy($PHP_UPLOADED_FILE_NAME,$DOCUMENT_ROOT.$REQUEST_URI); ?> - </programlisting></informalexample> - </para> - <simpara> + </programlisting> + </informalexample> + </para> + <simpara> This would copy the file to the location requested by the remote client. You would probably want to perform some checks and/or authenticate the user before performing this file copy. The only trick here is that when PHP sees a PUT-method request it stores the uploaded file in a temporary file just like those handled but - the <link - linkend="features.file-upload.post-method">POST-method</link>. + the <link linkend="features.file-upload.post-method">POST-method</link>. When the request ends, this temporary file is deleted. So, your PUT handling PHP script has to copy that file somewhere. The filename of this temporary file is in the $PHP_PUT_FILENAME @@ -348,10 +343,8 @@ You do not have to listen to this client. You could, for example, copy all uploaded files to a special uploads directory. </simpara> - </sect1> - - </chapter> - + </sect1> +</chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml Index: phpdoc/kr/features/http-auth.xml diff -u phpdoc/kr/features/http-auth.xml:1.1 phpdoc/kr/features/http-auth.xml:1.2 --- phpdoc/kr/features/http-auth.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/http-auth.xml Tue Jan 9 03:27:54 2001 @@ -1,25 +1,25 @@ <chapter id="features.http-auth"> <title>HTTP authentication with PHP</title> <simpara> - (ÏóÏûêÏ£º. HTTP authenticationÏù¥ÎûÄ Web ClientÏóê;å IDÏôÄ Passwordκ ÏûÖÎÝÎõÏïÑ, - Í ½ IDÏôÄ Passwordΰú WebΨ½ÏÑúÏóê ÏÝëÍ ºÏùÑ ÌóàÍÄ, ÎàÌóàÌïòÎäî ͽÎäÏùÑ ÎßêÌïúÎã§. - ÏûêÏѽÌûà ÏïåÍÝ ÏãÎã§Î©¥ RFC1945Ïùò Authentication ÎÄÎÑÏùÑ Ï½ÍÝÌïòͽ ÎîÎûÄÎã§. - http://pec.etri.re.kr/!qkim/HTTP/Ïóê ÌïúÍ½Ä Î¾àÏó Ψ½ÏÑúÎèÑ ÏûàÏúºÎãà ϽϰÌïòÏûê.) + (ìì주. HTTP authenticationì´ë Web Clientìê² IDì Password를 ì ë ¥ë°ì, + ê·¸ IDì Passwordë¡ Web문ìì ì ê·¼ì íê°, ë¶ííë 기ë¥ì ë§íë¤. + ìì¸í ìê³ ì¶ë¤ë©´ RFC1945ì Authentication ë¶ë¶ì ì°¸ê³ í기 ë°ëë¤. + http://pec.etri.re.kr/!qkim/HTTP/ì íê¸ ë²ì 문ìë ìì¼ë 참조íì.) </simpara> <simpara> - PHPκ ÏǨÏö©Ìïú HTTP Ïù½Ï¶ùÏùÄ Apache ήÎìàΰú ÏǨÏö©ÎêÝ ÎïåÎßå ÎèôÏûëÌïúÎã§. - CGI ξÑÏݺÏóêÏÑúÎäî Ïù¥ ͽÎäÏùÑ ÏǨÏö©ÌïÝ Ïàò ÏóÜÎã§. - Apache ήÎìàÏùò PHP Ïä§ÌŨζÌä½ÏóêÏÑú <function>Header</function>ÎùºÎäî Ìï®Ïàòκ ÏǨÏö©ÌïòΩ¥ - Client νåÎùºÏöÏÝÄÏóê;å Usernameͺ Passwordκ ÏûÖÎÝÎõÎäî ÏúàÎèÑÏöκ ÎùÑÏöÎèÑΰù ÌïòÎäî - "Ïù½Ï¶ù Ïöî͵¨"("Authentication Required") ΩîÏãúÏßÄκ Î¥ÎǺ Ïàò ÏûàÎã§. - ÏùºÎã® ÏǨÏö©ÏûêÍÄ Usernameͺ Passwordκ ÏûÖÎÝÌïòΩ¥, - user name, password, authentication typeÏùò ÍíÏùÑ ÍÄÏßÄÎäî - $PHP_AUTH_USER, $PHP_AUTH_PW, $PHP_AUTH_TYPEÏùò 3ÍúÏùò ÎÄÏàòκ ÍÄÏßÄÍÝ - Ìï¥Îã¼ URL(PHP Ïä§ÌŨζÌä½Îº Ìè¨Ìï®Ìïú)Ïù¥ Îã§Ïãú Îàζ¨ÏõåÏßÑÎã§. - ÌòÑÏû¨ authentication typeÏùÄ "Basic"ÎßåÏù¥ ÏßÄÏõêÎêúÎã§. - ÏûêÏѽÌïú ÏǨÏö©Î¾ïÏùÄ <function>Header</function> Ìï®Ïàòκ ÏÇ¥Ìé¥ Î¥Ïûê.</simpara> + PHP를 ì¬ì©í HTTP ì¸ì¦ì Apache 모ëë¡ ì¬ì©ë ëë§ ëìíë¤. + CGI ë²ì ¼ììë ì´ ê¸°ë¥ì ì¬ì©í ì ìë¤. + Apache 모ëì PHP ì¤í¬ë¦½í¸ìì <function>Header</function>ë¼ë í¨ì를 ì¬ì©íë©´ + Client ë¸ë¼ì°ì ìê² Usernameê³¼ Password를 ì ë ¥ë°ë ìëì°ë¥¼ ëì°ëë¡ íë + "ì¸ì¦ ì구"("Authentication Required") ë©ìì§ë¥¼ ë³´ë¼ ì ìë¤. + ì¼ë¨ ì¬ì©ìê° Usernameê³¼ Password를 ì ë ¥íë©´, + user name, password, authentication typeì ê°ì ê°ì§ë + $PHP_AUTH_USER, $PHP_AUTH_PW, $PHP_AUTH_TYPEì 3ê°ì ë³ì를 ê°ì§ê³ + í´ë¹ URL(PHP ì¤í¬ë¦½í¸ë¥¼ í¬í¨í)ì´ ë¤ì ë¶ë¦¬ìì§ë¤. + íì¬ authentication typeì "Basic"ë§ì´ ì§ìëë¤. + ìì¸í ì¬ì©ë²ì <function>Header</function> í¨ì를 ì´í´ ë³´ì.</simpara> <para> - client authenticationÏùÑ ÏǨÏö©ÌïòÏó¨ Í ½ ÏûÖÎÝÎêú ÍíÏùÑ ÏúÎÝÌïòÎäî ÏòàÏÝúÍÄ ÏïÑÎûòÏóê ÏûàÎã§. : + client authenticationì ì¬ì©íì¬ ê·¸ ì ë ¥ë ê°ì ì¶ë ¥íë ìì ê° ìëì ìë¤. : <example> <title>HTTP Authentication example</title> <programlisting role="php"> @@ -38,29 +38,29 @@ </example> </para> <para> - Ïó¨Îü¨ÎÑÏùÄ $PHP_AUTH_USER ÏôÄ $PHP_AUTH_PWκ Îã®ÏàúÌûà ÏúÎÝÌïòÎäî ÎåÄÏãÝ, - ÏǨÏö©ÏûêÏùò ÏãùÎÑÏùÑ ÏúÑÌï¥ usernameͺ passwordκ ÏǨÏö©Ìïòͽκ ÏõêÌïÝ Í¾ÉÏù¥Îã§. - Ïù¥ÎïåÎäî DatabaseÏóê QueryÌïòͱÎÇò ÏßÅÏÝë dbm ÌååÏùºÏóêÏÑú ÏæÏïÑÎ¥Îäî Îì±Ïùò ΩξïÏúºÎ°ú ÍÄÎäÌïÝ Í¾ÉÏù¥Îã§.</para> + ì¬ë¬ë¶ì $PHP_AUTH_USER ì $PHP_AUTH_PW를 ë¨ìí ì¶ë ¥íë ëì , + ì¬ì©ìì ìë³ì ìí´ usernameê³¼ password를 ì¬ì©í기를 ìí ê²ì´ë¤. + ì´ëë Databaseì Queryíê±°ë ì§ì dbm íì¼ìì ì°¾ìë³´ë ë±ì ë°©ë²ì¼ë¡ ê°ë¥í ê²ì´ë¤.</para> <para> - Internet Explorer browserÏóêÏÑúÎäî ξÑÍ ½Î°ú Ïù½Ìï¥ HeaderÏùò ÏàúÏÑúÍÄ Îß§Ïö ͼåÎã§Î°Îã§. - <emphasis>WWW-Authenticate</emphasis>κ - <errorcode>HTTP/1.0 401</errorcode>Î¥Î㧠ήºÏÝÄ Î¥ÎÇ¥Îäî ;ÉÏù¥ ÌòÑÏû¨ ÍÄÎäÌïú Ìä½Î¶ÏúºÎ°ú Î¥Ïù½Îã§. + Internet Explorer browserììë ë²ê·¸ë¡ ì¸í´ Headerì ììê° ë§¤ì° ê¹ë¤ë¡ë¤. + <emphasis>WWW-Authenticate</emphasis>를 + <errorcode>HTTP/1.0 401</errorcode>ë³´ë¤ ë¨¼ì ë³´ë´ë ê²ì´ íì¬ ê°ë¥í í¸ë¦ì¼ë¡ ë³´ì¸ë¤. </para> <simpara> - μÑÎÄξàÌò½Ïùò ÏúÝÏúÏùÑ ÏöÎݧÌïòÏó¨ HTTPÏóêÏÑú ÏÝú͵ÌïòÎäî Ïù½Ï¶ùÏùÑ ÏǨÏö©ÌïòÎäî ÎåÄÏãÝ - ͽϰ¥Ïùò Ïô½ÎÄ Î©îϼ¥Îãà϶òÏùÑ ÏǨÏö©ÌïÝ Í¾ÏöÏóêÎäî ΨºÎ°Ý PHP_AUTH ÎÄÏàòÎäî ÏѧÏÝïÎêòÏßÄ ÏïäÎäîÎã§. - Ïù¥Îü;Ïö externally-authenticated userκ ÌôïÏù½Ìïòͽ ÏúÑÌï¥ $REMOTE_USER ÎÄÏàòκ ÏǨÏö©ÌïÝ Ïàò ÏûàÎã§. + ë¹ë°ë²í¸ì ì ì¶ì ì°ë ¤íì¬ HTTPìì ì ê³µíë ì¸ì¦ì ì¬ì©íë ëì + 기존ì ì¸ë¶ ë©ì¹´ëì¦ì ì¬ì©í ê²½ì°ìë ë¬¼ë¡ PHP_AUTH ë³ìë ì¤ì ëì§ ìëë¤. + ì´ë°ê²½ì° externally-authenticated user를 íì¸í기 ìí´ $REMOTE_USER ë³ì를 ì¬ì©í ì ìë¤. </simpara> <simpara> - ÏúÝÏùòÌïÝ ÏÝêÏùÄ Ïù½Ï¶ùÏù¥ ÌïÑÏöîÌïú ÌéòÏù¥ÏßÄÏôÄ Ïù½Ï¶ùÏù¥ ÌïÑÏöîÏóÜÎäî ÌéòÏù¥ÏßÄÍÄ ÍôÏùÄ ÏÑúξÑÏÉÅÏóê ϰ¥Ïû¨ÌïÝ Îïå, - Ïù½Ï¶ùÏù¥ ÌïÑÏöîÏóÜÎäî URLÏùÑ controlÌïÝ Ïàò ÏûàÎäî ÎàÑ͵ÍÄÍÄ, - Ïù½Ï¶ùÏù¥ ÌïÑÏöîÌïú URLÏùò ÏïîÌò½Îº ÌõîÏêÎ¥Îäî ;ÉÏùÄ ÎßâÏùÑ Ïàò ÏóÜÎã§Îäî ÏÝêÏù¥Îã§. + ì ìí ì ì ì¸ì¦ì´ íìí íì´ì§ì ì¸ì¦ì´ íììë íì´ì§ê° ê°ì ìë²ìì ì¡´ì¬í ë, + ì¸ì¦ì´ íììë URLì controlí ì ìë ëêµ°ê°ê°, + ì¸ì¦ì´ íìí URLì ìí¸ë¥¼ íì³ë³´ë ê²ì ë§ì ì ìë¤ë ì ì´ë¤. </simpara> <simpara> - NetscapeÏôÄ Internet Explorer ήÎëê 401ÏùëÎãµ ÏîÎìúκ ÏÑúξÑÏóêÏÑú Îõ;åÎêòΩ¥ - local browser windowÏùò authentication cacheκ clearÌïúÎã§. - ϶â, Ïù¥Í¾ÉÏùÄ "log out"ÍúÎÖêÏù¥ ÎêòÎäî ;ÉÏúºÎ°ú, ÏǨÏö©ÏûêÎì§Î°ú ÌïòÏó¨Í½à usernameͺ ÏïîÌò½Îº Îã§Ïãú ÏûÖÎÝÌïò;å ÌïúÎã§. - ÏùºÎÄÎäî Ïù¥Í¾ÉÏùÑ ÌܵÌï¥ loginÏùò "time out"Ïù¥ÎÇò "log-out"ξÑÌäºÏùÑ ÎßåÎìúÎäîÎç ÏǨÏö©ÌïúÎã§ + Netscapeì Internet Explorer 모ë 401ìëµ ì½ë를 ìë²ìì ë°ê²ëë©´ + local browser windowì authentication cache를 clearíë¤. + ì¦, ì´ê²ì "log out"ê°ë ì´ ëë ê²ì¼ë¡, ì¬ì©ìë¤ë¡ íì¬ê¸ usernameê³¼ ìí¸ë¥¼ ë¤ì ì ë ¥íê² íë¤. + ì¼ë¶ë ì´ê²ì íµí´ loginì "time out"ì´ë "log-out"ë²í¼ì ë§ëëë° ì¬ì©íë¤ </simpara> <example> <title>HTTP Authentication example forcing a new name/password</title> @@ -90,12 +90,12 @@ </programlisting> </example> <simpara> - Í ½Îü¨ÎÇò Ïù¥ ÎèôÏûëÏùÄ HTTP Basic authentication ͽϧÄÏóê Î¥ÏûÎêú ;ÉÏùÄ ÏïÑÎãàÎØÄΰú Ïù¥ ͽÎäÏóê Ïùòϰ¥ÌïòÏó¨ÏÑúÎäî ÏïàÎêúÎã§. - LynxÏóêÏÑúÎäî 401 ÏÑúÎ¾Ñ ÏùëÎãµÏùÑ ÎõÏïÑÎèÑ authentication ÏÝïΥκ clearÌïòÏßÄ ÏïäÎäîÎã§. - ÎîÎùºÏÑú BackÏùÑ ÎàÑÎ¥ÍÝ Îã§Ïãú Forward ξÑÌäºÏùÑ ÎàåÎü¨ÏÑú Îã§Ïãú ÏÝëÍ ºÌïÝ Ïàò ÏûàÎã§.</simpara> + ê·¸ë¬ë ì´ ëìì HTTP Basic authentication 기ì¤ì ë³´ì¥ë ê²ì ìëë¯ë¡ ì´ ê¸°ë¥ì ìì¡´íì¬ìë ìëë¤. + Lynxììë 401 ìë² ìëµì ë°ìë authentication ì 보를 clearíì§ ìëë¤. + ë°ë¼ì Backì ëë¥´ê³ ë¤ì Forward ë²í¼ì ëë¬ì ë¤ì ì ê·¼í ì ìë¤.</simpara> <simpara> - ÎòêÌïú Ïù¥ Authentication ͽÎäÏùÄ Microsoft's IIS serverÏóêÏÑú - CGI versionÏùò PHPκ ÏǨÏö©ÌïÝ Í¾ÏöÏóêÎäî IISÏùò ÏÝúÏïÏúºÎ°úÏù½Ìï¥ ÎèôÏûëÌïòÏßÄ ÏïäÎäîÎã§. + ëí ì´ Authentication 기ë¥ì Microsoft's IIS serverìì + CGI versionì PHP를 ì¬ì©í ê²½ì°ìë IISì ì ì½ì¼ë¡ì¸í´ ëìíì§ ìëë¤. </simpara> </chapter> <!-- Keep this comment at the end of the file Index: phpdoc/kr/features/images.xml diff -u phpdoc/kr/features/images.xml:1.1 phpdoc/kr/features/images.xml:1.2 --- phpdoc/kr/features/images.xml:1.1 Tue Jan 9 02:58:55 2001 +++ phpdoc/kr/features/images.xml Tue Jan 9 03:27:54 2001 @@ -1,12 +1,12 @@ <chapter id="features.images"> - <title>PHPÏóêÏÑú Ïù¥ÎؽÏßÄ ÏÉùÏѱͺ ÏàòÏÝï(Creating and manipulating images)</title> + <title>PHPìì ì´ë¯¸ì§ ìì±ê³¼ ìì (Creating and manipulating images)</title> <simpara> - PHPÎäî Îã®ÏßÄ HTMLÏúÎÝÏùÑ ÎßåÎìúÎäî ;ÉÎßå ÌïÝ Ïàò ÏûàÎäî ;ÉÏù¥ ÏïÑÎãàÎã§. - PHPÎäî GIF image fileÎèÑ ÎßåÎì§ Ïàò ÏûàÏùÑ ÏûàÏùÑ ÎøêÏïÑÎãàÎùº, - ÏǨÏö©ÌïòͽÏóê Ìé½Î¶¨Ìïú GIF image streamͼåÏßÄ ÎßåÎì§ Ïàò ÏûàÎã§. - Ïù¥Îº ÏúÑÌï¥ÏÑú Ïó¨Îü¨ÎÑÏùÄ PHPκ Ϫ¥ÌååÏùº ÌïÝ Îïå, image Ìï®Ïàòκ ÍÄÏßÄÍÝ ÏûàÎäî GD ÎùºÏù¥Î½åÎü¨Î¶¨Îº Ìè¨Ìï®ÌïòÏó¨Ïïº ÌïúÎã§. - GDÏôÄ PHPÎäî ÏǨÏö©ÌïòÎäî Ïù¥ÎؽÏßÄ Ìè¨Îß ÌòïÌÉúÏóê ÎîÎùº Îã§Î½ ÎùºÏù¥Î½åÎü¨Î¶¨ÎèÑ Ïöî͵¨ÌïúÎã§. - GDÎäî ξÑÏÝÑ 1.6ÎÄÌÑ GIF Ïù¥ÎؽÏßÄ ÏßÄÏõêÏùÑ ÌïòÏßÄ ÏïäÎäîÎã§. + PHPë ë¨ì§ HTMLì¶ë ¥ì ë§ëë ê²ë§ í ì ìë ê²ì´ ìëë¤. + PHPë GIF image fileë ë§ë¤ ì ìì ìì ë¿ìëë¼, + ì¬ì©í기ì í¸ë¦¬í GIF image streamê¹ì§ ë§ë¤ ì ìë¤. + ì´ë¥¼ ìí´ì ì¬ë¬ë¶ì PHP를 ì»´íì¼ í ë, image í¨ì를 ê°ì§ê³ ìë GD ë¼ì´ë¸ë¬ë¦¬ë¥¼ í¬í¨íì¬ì¼ íë¤. + GDì PHPë ì¬ì©íë ì´ë¯¸ì§ í¬ë§· ííì ë°ë¼ ë¤ë¥¸ ë¼ì´ë¸ë¬ë¦¬ë ì구íë¤. + GDë ë²ì 1.6ë¶í° GIF ì´ë¯¸ì§ ì§ìì íì§ ìëë¤. </simpara> <para> <example> @@ -24,11 +24,11 @@ ?> </programlisting> </example> - ÏúÑÏùò ÏòàÏÝúÎäî <img src="button.php?text"> ÏôÄ ÍôÏùÄ tagÏù¥ ÏûàÎäî ÌéòÏù¥ÏßÄΰúÎÄÌÑ ÎàÎݧÏßÄ;å ÎêÝ Í¾ÉÏù¥Îã§. - Í ½Îü¨Î©¥ ÏúÑÏóêÏûàÎäî button.php Ïä§ÌŨζÌä½Îäî "text"ÎùºÎäî Ψ½ÏûêÏó¥ÏùÑ - "images/button1.gif"Ïóê Ïò§Î¾ÑÎÝàÏù¥ ÏãúϺú ;ͺ imageÏóê ÏúÎÝÌïúÎã§. - Ïù¥ÎÝá;å ÌïòΩ¥ ξÑÌäºÏóê Îì§Ïñ¥ÍÄÎäî ͽÄÏî®Îº Îߧξà ÏÜêÏâ;å ÎîÍøî Ïì½ Ïàò ÏûàÍÝ, - ÎòêÌïú Îߧξà Ïù¥ÎؽÏßÄ ÌååÏùºÏùÑ ÎßåÎì§ ÌïÑÏöîÍÄ ÏóÜÏñ¥ Ìö®Ïú®ÏÝÅÏù¥ÍÝ ÍÑÎã®ÌïòÎã§. + ìì ìì ë <img src="button.php?text"> ì ê°ì tagì´ ìë íì´ì§ë¡ë¶í° ë¶ë ¤ì§ê² ë ê²ì´ë¤. + ê·¸ë¬ë©´ ìììë button.php ì¤í¬ë¦½í¸ë "text"ë¼ë 문ìì´ì + "images/button1.gif"ì ì¤ë²ë ì´ ìì¼ ê²°ê³¼ imageì ì¶ë ¥íë¤. + ì´ë ê² íë©´ ë²í¼ì ë¤ì´ê°ë ê¸ì¨ë¥¼ ë§¤ë² ìì½ê² ë°ê¿ ì¸ ì ìê³ , + ëí ë§¤ë² ì´ë¯¸ì§ íì¼ì ë§ë¤ íìê° ìì´ í¨ì¨ì ì´ê³ ê°ë¨íë¤. </para> </chapter> <!-- Keep this comment at the end of the file