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:

Description

Returns a filename of a Temporary unique file.

Please note that the calling function must unlink() this itself.

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.

Related Functions

wp_basename, wp_is_stream, wp_head, wp_meta, wp_mail

Top Google Results

User discussions

wpseek mobile