下面来看看这款php copy 函数教程吧。
copy
( PHP 4中, PHP 5中)
复制-复制文件
描述
布尔copy(字符串$来源,字符串$ dest [ ,资源$背景] )
使文件的一个copy源dest 。
如果你想移动的文件,请使用重新命名( )函数。
参数
来源
路径的源文件。
dest
目的地路径。如果dest是一个网址,复制操作可能会失败,如果包装不支持覆盖现有的文件。
警告
如果目标文件已经存在,它会被覆盖。
背景
资源的有效范围内建立stream_context_create ( ) 。
返回值
返回TRUE或FALSE的成功失败。
修改
版本说明
5.3.0时间方面的支持。
4.3.0来源和dest现在可能网址如果“打开包装”已启用。见fopen ( )函数的更多细节。
实例
例如# 1copy( )的例子
$file = 'example.txt';
$newfile = 'example.txt.bak';
if (!copy($file, $newfile)) {
echo "failed to copy $file...n";
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 English version
Recommended: Win version, supports code prompts!

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.