PHP tmpfile() very handy to use, auto delete after request complete or fclose().
But many library not accept stream object, they only accept a physical file path, use fowling code to get path:
$f = tmpfile();
$p = stream_get_meta_data($f)['uri'];





网友评论