1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - 网站技术 - php - 正文

君子好学,自强不息!

实例说明:

<?php
$temp = tmpfile();
fwrite($temp, "Testing, testing.");
//Rewind to the start of file
rewind($temp);
//Read 1k from file
echo fread($temp,1024);
//This removes the file
fclose($temp);
?>

标签含义:

tmpfile:函数以读写(w+)模式创建一个具有唯一文件名的临时文件。

注释:临时文件会在文件关闭后(用 fclose())或当脚本结束后自动被删除。

源代码运行结果如下:

Testing, testing.


本文来源:1818IP

本文地址:https://www.1818ip.com/post/342.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。