wp_tempnam
wp_tempnam ( $filename = '', $dir = '' )
Parameters:- (string) filename Optional. Filename to base the Unique file off. Default empty.
- (string) dir Optional. Directory to store the file in. Default empty.
Returns:- (string) A writable filename.
Defined at: - Introduced in WordPress: 2.6.0
- Deprecated in WordPress: —
Description
Returns a filename of a temporary unique file.Please note that the calling function must delete or move the file.
The filename is based off the passed parameter or defaults to the current unix timestamp,
while the directory can either be passed as well, or by leaving it blank, default to a writable
temporary directory.