(PHP 5 >= 5.2.1)
sys_get_temp_dir — Returns directory path used for temporary files
Returns the path of the directory PHP stores temporary files in by default.
Returns the path of the temporary directory.
Example #1 sys_get_temp_dir() example 以上例程的输出类似于:
<?php
// Create a temporary file in the temporary
// files directory using sys_get_temp_dir()
$temp_file = tempnam(sys_get_temp_dir(), 'Tux');
echo $temp_file;
?>
C:WindowsTempTuxA318.tmp