Definition and Usage
copy () function copies files.
If successful, the function returns TRUE, if FALSE on failure.
grammar
copy(file,to_file)
参数 | 描述 |
---|---|
file | 必需。规定要复制的文件。 |
to_file | 必需。规定复制文件的目的地。 |
Tips and Notes
Note: If the target file already exists, it will be overwritten.
Examples
<?php echo copy("source.txt","target.txt"); ?> 上面的
代码将输出: