Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

sys_get_temp_dir

Description

Returns directory path used for temporary files

Syntax

sys_get_temp_dir(): string

Return

Returns the path of the temporary directory.

Examples

1 · directory

<?

$return = sys_get_temp_dir();

echo $return;

?>
/tmp

2 · file

<?

$dir = sys_get_temp_dir();
$prefix = 'tmp';

$tempnam = tempnam($dir, $prefix);

echo $tempnam;

unlink($tempnam);

?>
/tmp/tmpVBsdIk
HomeMenu