当前位置: 首页> 函数类别大全> copy

copy

拷贝文件
名称:copy
分类:文件系统
所属语言:php
一句话介绍:复制文件。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function"></span><mark><span class="token function">copy</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"source.txt"</span><span class="token punctuation">,</span><span class="token string double-quoted-string">"target.txt"</span><span class="token punctuation">)</span></mark><span class="token punctuation"></span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

1
同类函数
  • 将整个文件读入一个字符串  file_get_contents

    file_get_contents

    将整个文件读入一个字符串
  • 同步对文件的更改(包括元数据)  fsync

    fsync

    同步对文件的更改(包括元数据)
  • 获取 realpath 缓存条目  realpath_cache_get

    realpath_cache_get

    获取realpath缓存条目
  • 寻找与模式匹配的文件路径  glob

    glob

    寻找与模式匹配的文件路径
  • 给出一个文件或符号连接的信息  lstat

    lstat

    给出一个文件或符号连接的信息
  • 轻便的咨询文件锁定  flock

    flock

    轻便的咨询文件锁定
  • 清除文件状态缓存  clearstatcache

    clearstatcache

    清除文件状态缓存
  • 返回规范化的绝对路径名  realpath

    realpath

    返回规范化的绝对路径名
热门文章