tempnam

tempnam -- Create file with unique file name

Description

string tempnam ( string dir, string prefix)

דוגמה 1 . tempnam( ) example

 
$tmpfname

 
=

 
tempnam

 
(

 
"

 
/

 
tmp"

 
,

 
"FOO")

 
;

 
$fp

 
=

 
fopen($tmpfname

 
,

 
"w")

 
;

 
fwrite($fp

 
,

 
"writing

 
to

 
tempfile")

 
;

 
fclose($fp)

 
;

 
/

 
/

 
do

 
here

 
something

 
unlink($tmpfname)

 
;





הערה :