成免费的crm,久久国产精品新农夫导航新妓网,恋夜秀场全部视频安卓手机,女校花强奷在线播放A级

PHP tmpfile() 函數(shù)

PHP tmpfile() 函數(shù)

PHP Filesystem 參考手冊(cè) 完整的 PHP Filesystem 參考手冊(cè)

定義和用法

tmpfile() 函數(shù)以讀寫(w+)模式創(chuàng)建一個(gè)具有唯一文件名的臨時(shí)文件。

語法

tmpfile()

提示和注釋

注釋:臨時(shí)文件會(huì)在文件關(guān)閉后(用 fclose())或當(dāng)腳本結(jié)束后自動(dòng)被刪除。

提示:參見 tempnam()。

實(shí)例

<?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);
?>

上面的代碼將輸出:

Testing, testing.

PHP Filesystem 參考手冊(cè) 完整的 PHP Filesystem 參考手冊(cè)
相關(guān)文章