PHP » PYTHON |
login |
register |
about
|
#if you want to copy file(not directory) i.e. source is file:
import shutil shutil.copy(sorce,destination) #if you want to copy directory i.e. source is directory: import shutil shutil.copytree(sorce,destination) copy(PHP 4, PHP 5) copy — Copies file Description
bool copy
( string $source
, string $dest
[, resource $context
] )
Makes a copy of the file source to dest . If you wish to move a file, use the rename() function. Parameters
Return ValuesReturns TRUE on success or FALSE on failure. Changelog
Examples
Example #1 copy() example
<?php
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|