Hi all,
Does anyone know how you can get a filename if all you've got is the
resource (e.g. returned by fopen())?
The reason I ask is that I'd like to use tmpfile() to create a temporary
file (because then it will be automatically deleted should my script
abruptly terminate.) Once I've written my data to this file, I then
need to pass the filename on to an external command, but I can't see any
way to find out what the temporary file is called.
I've tried using fstat(), but this returns everything except the filename.
Any ideas?
Thanks,
Adam.