Current Location: Home> Function Categories> copy

copy

Copy the file
Name:copy
Category:File system
Programming Language:php
One-line Description:Copy the file.

Definition and usage

copy() function copies the file.

Example

 <?php
echo copy ( "source.txt" , "target.txt" ) ;
?>

Output:

 1

grammar

 copy ( source , destination )
parameter describe
source Required. Specifies the files to be copied.
destination Required. Specify the destination for copying the file.

illustrate

Copy the file from source to destination . Return TRUE if successful, otherwise return FALSE.

Similar Functions
  • Synchronize data (but not metadata) to a file fdatasync

    fdatasync

    Synchronizedata(butn
  • Get the inode modification time of the file filectime

    filectime

    Gettheinodemodificat
  • Read a line from the file pointer and parse the CSV field fgetcsv

    fgetcsv

    Readalinefromthefile
  • Change file mode chmod

    chmod

    Changefilemode
  • Returns the location where the file pointer is read/write ftell

    ftell

    Returnsthelocationwh
  • See unlink() or unset() (PHP does not have delete keywords or functions) delete

    delete

    Seeunlink()orunset()
  • Match file names with pattern fnmatch

    fnmatch

    Matchfilenameswithpa
  • Delete directory rmdir

    rmdir

    Deletedirectory
Popular Articles