1<?php
2//To get the name of the temp directory use the below
3sys_get_temp_dir(); // outputs the temp directory's name ..
4// To create a temporary file in the
5// temporary files directory using sys_get_temp_dir()
6$temp_file = tempnam(sys_get_temp_dir(), 'Tux');
7echo $temp_file;
8?>