Fill in the blank with the appropriate PHP function.
The ___ function generates a file resource having 0600 file permission in the file system with a randomly-generated filename to be used as temporary storage.
*Exact matching is required.
tempnam
Correct:
tempnam
Explanation:
The tempnam() function generates a file resource having 0600 file permission in the file system with a randomly-generated filename to be used as temporary storage. The syntax of the tempnam function is as follows:
string tempnam ( string $dir , string $prefix )
The tempnam() function creates a file with a unique filename, with access permission set to 0600, in the specified directory. If the directory does not exist, tempnam() may generate a file in the system's temporary directory, and return the name of that.