LoginSignup
5
3

More than 5 years have passed since last update.

phpのtmpfile()が返すファイルのパスを取得する

Posted at

確認環境

  • PHP 7.0.8 (cli)

使う物

stream_get_meta_data

$tmp_fp = tmpfile();

$meta = stream_get_meta_data($tmp_fp);
$tmp_path = $meta["uri"];

var_dump($tmp_path);

fclose($tmp_fp);
string(14) "/tmp/phpRlrxyr"
5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3