diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index 957146f1f..69b481ac4 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5506,4 +5506,18 @@ return null; } + + function tmpdirname($path, $prefix) { + // Use PHP's tmpfile function to create a temporary + // directory name. Delete the file and keep the name. + $tempname = tempnam($path,$prefix); + if (!$tempname) + return false; + + if (!unlink($tempname)) + return false; + + return $tempname; + } + ?> |