Reputation: 5957
I just create a temp file with tmpfile
in order to put into it a file I get from a remote FTP server.
I need to pass to an API the URL to this file, but tmpfile
return a resource... How can I retrieve its path?
Upvotes: 0
Views: 1077
Reputation: 5438
Actually,
stream_get_meta_data($file)['uri']
should contain the path.
Upvotes: 1