Php on windows and blocks
My development PC has windows installed. And I've experienced weird php behaviour:
<?php
file_put_contents('c:/q', microtime(1) . "\r\n", FILE_APPEND);
sleep(10);
When I run this script in browser simultaneously in two different tabs I get such results
1294713622.125
1294713632.2188
which obviously is not what I expected, although in CLI everything is fine.
So the question: what can block 开发者_如何学Pythonexecution? (session.auto_start
is Off
)
The issue is in Firefox. It doesn't run requests simultaneously if the requests headers are identical. The issue disappears if network.http.use-cache
is disabled in Firefox's config.
it's a good idea to report this bug to mozilla ;)
microtime() returns the current UNIX timestamp in microseconds. You should expect it to return a different result when run twice.
精彩评论