cvs: phpdoc-zh /reference/filesystem/functions copy.xml

From: Date: Tue, 16 Aug 2005 14:07:01 +0000
Subject: cvs: phpdoc-zh /reference/filesystem/functions copy.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-2331@lists.php.net to get a copy of this message
lm92 Tue Aug 16 10:07:01 2005 EDT Modified files: /phpdoc-zh/reference/filesystem/functions copy.xml Log: updated to en version http://cvs.php.net/diff.php/phpdoc-zh/reference/filesystem/functions/copy.xml?r1=1.5&r2=1.6&ty=u Index: phpdoc-zh/reference/filesystem/functions/copy.xml diff -u phpdoc-zh/reference/filesystem/functions/copy.xml:1.5 phpdoc-zh/reference/filesystem/functions/copy.xml:1.6 --- phpdoc-zh/reference/filesystem/functions/copy.xml:1.5 Mon Aug 18 16:51:02 2003 +++ phpdoc-zh/reference/filesystem/functions/copy.xml Tue Aug 16 10:06:58 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.5 $ --> -<!-- $Author: dallas $ --> +<!-- $Revision: 1.6 $ --> +<!-- $Author: lm92 $ --> <!-- EN-Revision: 1.6 Maintainer: dallas Status: ready --> <refentry id="function.copy"> <refnamediv> @@ -21,14 +21,20 @@ <programlisting role="php"> <![CDATA[ <?php -if (!copy($file, $file.'.bak')) { - print ("failed to copy $file...<br>\n"); +$file = 'example.txt'; +$newfile = 'example.txt.bak'; + +if (!copy($file, $newfile)) { + echo "failed to copy $file...\n"; } ?> ]]> </programlisting> </example> </para> + <para> + Èç¹ûÒªÒÆ¶¯ÎļþµÄ»°£¬ÇëʹÓà <function>rename</function> º¯Êý¡£ + </para> <note> <para> ´Ó PHP 4.3.0 ¿ªÊ¼£¬Èç¹ûÆôÓÃÁË¡°fopen wrappers¡±µÄ»°£¬<parameter>source</parameter> ºÍ @@ -41,6 +47,12 @@ Èç¹ûÄ¿±êÎļþÒÑ´æÔÚ£¬½«»á±»¸²¸Ç¡£ </para> </warning> + <note> + <para> + Windows ¼æÈÝ£ºÈç¹û¸´ÖÆÒ»¸öûÓÐÌå»ýÊôÐÔµÄÎļþ£¬<function>copy</function> + ½«·µ»Ø &false; £¬µ«ÎļþÒ²»á±»ÕýÈ·¸´ÖÆ¡£ + </para> + </note> <para> ²Î¼û <function>move_uploaded_file</function>£¬<function>rename</function> ºÍÊÖ²áÖйØÓÚ<link linkend="features.file-upload">ÎļþÉÏ´«´¦Àí</link>Ò»½Ú¡£

« previous php.doc.zh (#2331) next »