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

1

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

I know that the tempnam function generates a temporary name for a file. When the directory passed by the 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.

    
asked by anonymous 03.08.2015 / 17:29

1 answer

2

sys_get_temp_dir() . Just this :)

    
03.08.2015 / 17:32