wp_tempnam ( $filename = '', $dir = '' )

  • (string) filename Optional. Filename to base the Unique file off. Default empty.
  • (string) dir Optional. Directory to store the file in. Default empty.
  • (string) A writable filename.
Defined at:


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.

Related Functions

wp_basename, wp_is_stream, wp_date, wp_head, wp_mail

Top Google Results

User discussions

wpseek mobile