Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在使用 php 处理 http 请求时,我试图在 beginRequest 和 endRequest 上获取时间戳。我知道如何在 asp.net 上执行此操作(使用 httpModules 和函数 beginRequest 和 endRequest)。有谁知道这个选项在 php 上是否可用并指导我怎么做?(我不是在寻找解决方案,只是一些指导或良好的参考,因为我找不到任何...)
$_SERVER['REQUEST_TIME']具有请求的 Unix 时间戳。如果您想要精确的时间,请使用microtime
$_SERVER['REQUEST_TIME']