aidan           Mon Aug 30 03:32:22 2004 EDT

  Modified files:              
    /phpdoc/en/reference/filesystem/functions   copy.xml 
  Log:
  Simplified example
  Added note about windows compatability
  
http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/copy.xml?r1=1.10&r2=1.11&ty=u
Index: phpdoc/en/reference/filesystem/functions/copy.xml
diff -u phpdoc/en/reference/filesystem/functions/copy.xml:1.10 
phpdoc/en/reference/filesystem/functions/copy.xml:1.11
--- phpdoc/en/reference/filesystem/functions/copy.xml:1.10      Wed Jul 21 14:43:56 
2004
+++ phpdoc/en/reference/filesystem/functions/copy.xml   Mon Aug 30 03:32:21 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
 <!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
   <refentry id="function.copy">
    <refnamediv>
@@ -21,8 +21,11 @@
       <programlisting role="php">
 <![CDATA[
 <?php
-if (!copy($file, $file.'.bak')) {
-    echo "failed to copy $file...<br />\n";
+$file = 'example.txt';
+$newfile = 'example.txt.bak';
+
+if (!copy($file, $newfile)) {
+    echo "failed to copy $file...\n";
 }
 ?>
 ]]>
@@ -46,6 +49,13 @@
       If the destination file already exists, it will be overwritten.
      </para>
     </warning>
+    <note>
+     <para>
+      Windows Compatability Note: If you copy a file with no size,
+      <function>copy</function> will return false, but the file will be correctly
+      copied.
+     </para>
+    </note>
     <para>
      See also <function>move_uploaded_file</function>,
      <function>rename</function>, and the section of the manual

Reply via email to