Windows 和块上的 PHP [英] Php on windows and blocks
问题描述
我的开发 PC 安装了 Windows.我经历过奇怪的 php 行为:
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
这显然不是我所期望的,尽管在 CLI 中一切都很好.
which obviously is not what I expected, although in CLI everything is fine.
那么问题是:什么可以阻止执行?(session.auto_start
是 Off
)
So the question: what can block execution? (session.auto_start
is Off
)
推荐答案
问题出在 Firefox 中.如果请求标头相同,它不会同时运行请求.如果 network.http.use-cache
在 Firefox 的配置中被禁用,问题就会消失.
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.
向 mozilla 报告这个错误是个好主意;)
it's a good idea to report this bug to mozilla ;)
这篇关于Windows 和块上的 PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!