PHP tempnam() 函数

PHP 教程 · 2019-01-25 16:29:10

定义和用法

tempnam() 函数在指定的目录中创建一个具有唯一文件名的临时文件。

该函数返回新的临时文件名,如果失败则返回 FALSE。

语法


tempnam(dir,prefix)


参数 描述
dir 必需。规定创建临时文件的目录。
prefix 必需。规定文件名的开头。

提示和注释

注释:如果指定的目录不存在,那么 tempnam() 会在系统的临时目录中生成一个文件。

提示:参见 tmpfile()。

实例


<?php
echo tempnam("C:inetpubtestweb","TMP0");
?> 

上面的代码将输出:


C:inetpubtestwebTMP1.tmp


点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Is Parallel Programming Hard, And, If So, What Can You Do About

Is Parallel Programming Hard, And, If So, What Can You Do About

Paul E. McKenney

The purpose of this book is to help you understand how to program shared-memory parallel machines without risking your sanity.1 By describing the algorithms and designs that have worked well in the pa......一起来看看 《Is Parallel Programming Hard, And, If So, What Can You Do About 》 这本书的介绍吧!

html转js在线工具
html转js在线工具

html转js在线工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具