$fname = tempnam() . getmypid(); $f = fopen($fname, "w");
tempnam()this is the name of the file, but
getmypid()- Process ID, as it was then
fopen($fname, "w");may not work if 1 parameter, you specify the file name or URL, and $fname is the name with ID?
w - Opens the file for writing only; places the pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.
Find more questions by tags PHP