Join Up!
96812 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previousclearstatcachedeletenext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German | Spanish

copy

(PHP 3, PHP 4 >= 4.0.0)

copy -- Copies file

Description

int copy ( string source, string dest)

Makes a copy of a file. Returns TRUE if the copy succeeded, FALSE otherwise.

Esimerkki 1. copy() example

if (!copy($file, $file.'.bak')) {
    print ("failed to copy $file...<br>\n");
}

Huomaa: As of PHP 4.3.0, both source and dest may be URLs if the "fopen wrappers" have been enabled. See fopen() for more details.

Varoitus

If the destination file already exists, it will be overwritten.

See also move_uploaded_file(), rename(), and the section of the manual about handling file uploads.

User Contributed Notes
copy
add a note about notes
There are no user contributed notes for this page.
previousclearstatcachedeletenext
Last updated: Tue, 28 May 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST