Q:

Write a PHP script to get the directory path used for temporary files

0

Write a PHP script to get the directory path used for temporary files.

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?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."\n";
?>

Sample Output:

/tmp/TuxN0kaAE 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now