Output C:\testew\TMP1.tmp"/> Output C:\testew\TMP1.tmp">

Home >Backend Development >PHP Tutorial >tempnam() function in PHP

tempnam() function in PHP

王林
王林forward
2023-09-20 20:37:021826browse

tempnam() function in PHP

The tempnam() function creates a temporary file with a unique file name.

grammar

tempnam(dir, prefix)

parameter

  • dir - The directory where temporary files will be created.

  • Prefix - Beginning of file

return

tempnam() function returns the new temporary file name, or FALSE on failure.

Example

<?php
   echo tempnam("C:\test</p><p>ew","TMP");
?>

Output

C:\test</p><p>ew\TMP1.tmp

The above is the detailed content of tempnam() function in PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete