|
Posted by Dave (from the UK) on 05/20/06 18:45
I want to create a temporary file using php on a UNIX computer running
Apache. I have at the minute something like this below.
$inputfile="/tmp/foo";
$handle = fopen($inputfile, 'w');
fwrite($handle, $cmd);
etc
But if two people access the web page, they both create the file
/tmp/foo and so one will corrupt the other as data is written into it.
Can a create a unique temp file, then remove it when finished with it?
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
Navigation:
[Reply to this message]
|