xiaozi 2020-07-12 09:30:34

php获取tempfile路径

<?php

function tmpfilepath() {
    $path = stream_get_meta_data(tmpfile())['uri'];

    register_shutdown_function(
        function () use ($path) {
            unlink($path);
        }
    );

    return $path;
}

评论

- 위키
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-08 17:48
浙ICP备14020137号-1 $방문자$