Hello!
I'm trying to understand why this script doesn't work, when I execute script simultaneously in same browser or browser tab, second script do not see the created file "/tmp/monkey.tmp" (php7.4-fpm + nginx, default config, opcache enabled)
As soon as I used two different browsers, it works like expected, if I execute same script/URL simultaneously and one script with random data for example URL?_=monkey, it works like expected, problem is same URL in same browser, I dont understand why
$tmpfile = '/tmp/monkey.tmp';
clearstatcache();
if(file_exists($tmpfile))
{
die('file exist');
}
else
{
file_put_contents($tmpfile, 'blabla');
}
sleep(20);
exit;