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

tempnam

建立一个具有唯一文件名的文件
名称:tempnam
分类:文件系统
所属语言:php
一句话介绍:创建唯一的临时文件。

实例

<span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">tempnam</span><span class="token punctuation">(</span><span class="token string double-quoted-string">"C:\inetpub\testweb"</span><span class="token punctuation">,</span><span class="token string double-quoted-string">"TMP0"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

输出:

C:\inetpub\testweb\TMP1.tmp
同类函数
  • 同步对文件的更改(包括元数据)  fsync

    fsync

    同步对文件的更改(包括元数据)
  • 写入文件(可安全用于二进制文件)  fwrite

    fwrite

    写入文件(可安全用于二进制文件)
  • 将缓冲内容输出到文件  fflush

    fflush

    将缓冲内容输出到文件
  • 检查文件或目录是否存在  file_exists

    file_exists

    检查文件或目录是否存在
  • 打开文件或 URL  fopen

    fopen

    打开文件或URL
  • 用模式匹配文件名  fnmatch

    fnmatch

    用模式匹配文件名
  • 输出文件指针处的所有剩余数据  fpassthru

    fpassthru

    输出文件指针处的所有剩余数据
  • 通过已打开的文件指针取得文件信息  fstat

    fstat

    通过已打开的文件指针取得文件信息