note 10720 deleted from function.tempnam by sniper
| From: | sniper@php.net | Date: | Tue, 08 Apr 2003 20:25:57 +0000 |
| Subject: | note 10720 deleted from function.tempnam by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-46368@lists.php.net to get a copy of this message | ||
Actually, the definition of this function should read "creates unique file with unique
filename" as of PHP4.0.3. The note above does mention this. I have found that in order to use
scripts where I need a tempnam, I have to unlink($file) immediately before I attempt to open the
file for writing. If I do not unlink($file) then my program attempts to write to a file that already
exists and cannot do so without user intervention.