How to get the default temporary operating system directory in PHP?

Asked

Viewed 781 times

1

In PHP, there is some way [or some function that has the purpose] to get the directory where temporary files are saved in a given operating system?

I know the function tempnam generates a temporary name for a file. When the directory passed by first parameter does not exist, it returns a file name along with the temporary folder.

But I want to know how to get only the temporary folder.

1 answer

3


  • I beat my record for shortest answer :D Soon I :D

  • Wow, the guy used 30 characters (applying a Trim) to give the answer!

  • Drops to 27 if we remove useless characters like ":)"

  • @Wallacemaxters Try to.

  • then falls p 16 if it is to leave only the necessary...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.