Complete PHP Filesystem Reference
The tempnam() function creates a temporary file with a unique filename in the specified directory.
This function returns the new temporary filename, or FALSE on failure.
| Parameter | Description |
|---|---|
| dir | Required. Specifies the directory of where to create the temp file |
| prefix | Required. Specifies the start of the filename |
Note: If the specified directory does not exist, tempnam() may generate a file in the system's temporary directory.
Tip: See also tmpfile()
The output of the code above could be:
Complete PHP Filesystem Reference
Your message has been sent to W3Schools.