note 10720 added to tempnam

From: Date: Thu, 18 Jan 2001 22:10:12 +0000
Subject: note 10720 added to tempnam
Groups: php.notes 
Request: Send a blank email to php-notes+get-9944@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. http://www.php.net/manual/en/function.tempnam.php

« previous php.notes (#9944) next »