Hi,
I posted a message earlier, however, I believe I found a way around the issues I was having.
File locking is a bit tricky - and I am simply looking for some basic clarification on the matter.
If I lock a file - and confirm the lock with an if statement - (example below) - and then proceed to open a second file within the if statement - is the lock on the first file lost?
Not too stupid a question I hope 🙂
Thank you guys.
Regards,
-m.
Example :
//
//
$fp=@fopen("process.pid","a+");
if ($fp !=0 && flock($fp,2) && fseek($fp,0)==0)
{
now we try a fp2=fopen....
}
//
//