"PHP tmpfile()"의 두 판 사이의 차이

(새 문서: ==개요== ;PHP tmpfile() <syntaxhighlight lang='php' run> <?php $temp = tmpfile(); fwrite($temp, "writing to tempfile"); fseek($temp, 0); echo fread($temp, 1024); fclose($temp); //...)
 
10번째 줄: 10번째 줄:
fclose($temp); // this removes the file
fclose($temp); // this removes the file
</syntaxhighlight>
</syntaxhighlight>
 
<syntaxhighlight lang='php' run>
<?php
$file = tmpfile();
$path = stream_get_meta_data($file)['uri']; // eg: /tmp/phpFx0513a
</syntaxhighlight>


==같이 보기==
==같이 보기==

2021년 4월 21일 (수) 15:23 판

1 개요

PHP tmpfile()
<?php
$temp = tmpfile();
fwrite($temp, "writing to tempfile");
fseek($temp, 0);
echo fread($temp, 1024);
fclose($temp); // this removes the file
<?php
$file = tmpfile();
$path = stream_get_meta_data($file)['uri']; // eg: /tmp/phpFx0513a

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}