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

 
13번째 줄: 13번째 줄:
<?php
<?php
$file = tmpfile();
$file = tmpfile();
$path = stream_get_meta_data($file)['uri']; // eg: /tmp/phpFx0513a
$path = stream_get_meta_data($file)['uri'];
echo $path;
</syntaxhighlight>
</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'];
echo $path;

2 같이 보기[ | ]

3 참고[ | ]

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