PHP中的tmpfile()函数
该tmpfile()函数创建一个唯一的临时文件。它返回新文件的文件指针,如果失败则返回FALSE。
语法
tmpfile()
参数
不适用
返回
该tmpfile()函数返回新文件的文件指针,如果失败则返回FALSE。
示例
<?php $tmpfile = tmpfile(); fwrite($tmpfile, "This is demo text in temp file!"); rewind($tmpfile); echo fread($tmpfile, 1024); fclose($tmpfile); ?>
输出结果
This is demo text in temp file!
热门推荐
10 圣诞祝福语简短小学
11 祖国七十华诞简短祝福语
12 老师送的祝福语简短
13 生日祝福语大全女生简短
14 祝女性生日祝福语简短
15 牛年女神节祝福语简短
16 情人表白祝福语简短大气
17 老公开业祝福语简短
18 官宣新年祝福语简短