Create a temporary file with a unique filename in the specified directory in PHP

Description

The following code shows how to create a temporary file with a unique filename in the specified directory.

Example



<?php
    echo tempnam("C:/testweb/a/a/a/a/","TMP0");
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip