在特定时间,如何找到使用PHP登录的人数 [英] In a particular time , how to find a how many peoples logged in using PHP
问题描述
在日志文件中如何查找特定时间登录的人数
示例:
John 12:00:47
约翰福音04:18:54
约翰福音09:21:40
Abc 09:22:34
Abc 09:23:15 />
Abc 09:23:54
cena 09:30:21
John 10:38:20
John 09 :18:27
Cena 09:19:01
Abc 09:20:44
Abc 09:22:12
约翰福音09:24:02
约翰福音10:09:59
这是我的日志文件详情,我想知道09.23有多少人记录。
除外输出是Abc,Abc
在我的代码中我得到所有日期请帮帮我
我尝试过:
if(isset($ time))
{
foreach($ log_file as $ file)
{
$ name_time = explode('',$ file);
$ name = explode('|',$ name_time [0]);
$ time = explode('|',$ name_time [1]);
print_r($ name [0]。。$ time [0]。
);
}
}
In a log file how to find a particular time how many peoples logged in
example:
John 12:00:47
John 04:18:54
John 09:21:40
Abc 09:22:34
Abc 09:23:15
Abc 09:23:54
cena 09:30:21
John 10:38:20
John 09:18:27
Cena 09:19:01
Abc 09:20:44
Abc 09:22:12
John 09:24:02
John 10:09:59
this is my log file details here i want to know 09.23 how many peoples logged .
excepted output is Abc , Abc
In my code I am getting all date please help me
What I have tried:
if(isset($time))
{
foreach($log_file as $file)
{
$name_time = explode(' ', $file);
$name = explode('|', $name_time[0]);
$time = explode('|', $name_time[1]);
print_r($name[0]." ".$time[0]."
");
}
}
推荐答案
时间))
{
foreach(
time))
{
foreach(
log_file as
log_file as
file)
{
file)
{
这篇关于在特定时间,如何找到使用PHP登录的人数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!