小编Mum*_*rew的帖子

获得30天的回溯日期和时间

我想从PHP(从例如30 8月14日23:06)到30天(例如1 8月14日23:06)计算PHP中过去30天的时间段.我写了这个,其中当前日期时间在$ d1和过去30天datetime在$ d2,但不知何故我没有得到正确的结果.任何的想法?

$url=$row["url"];
$pageid=getPageID($url);
$date=date('y-m-d g:i');
$d1=strtotime($date);
$d2=date(strtotime('today - 30 days'));
Run Code Online (Sandbox Code Playgroud)

谢谢

php datetime date datetime-format

5
推荐指数
3
解决办法
2万
查看次数

在html表中添加两个类

看看这篇文章,我创建了一个类(t1),以便将表正确放置在移动设备上.像这样:

/*
Label the data
*/
.t1 td:nth-of-type(1):before { content: "Name"; }
.t1 td:nth-of-type(2):before { content: "Category A"; }
.t1 td:nth-of-type(3):before { content: "Category B"; }
.t1 td:nth-of-type(4):before { content: "Category C"; }

.t2 td:nth-of-type(1):before { content: "Name"; }
.t2 td:nth-of-type(2):before { content: "Category X"; }
.t2 td:nth-of-type(3):before { content: "Category Y"; }
.t2 td:nth-of-type(4):before { content: "Category Z"; }
Run Code Online (Sandbox Code Playgroud)

我还从这个网站添加了一个表格分类器,分拣机也正常工作.分拣机已经有一个类(tablesorter)

当我使用以下内容时,由于t1类,表格在移动设备上正确定位

<table id="table1" class="t1" width="100%" border="1" >
Run Code Online (Sandbox Code Playgroud)

当我使用以下内容时,由于tablesorter类,表正在排序

<table id="table1" class="tablesorter" …
Run Code Online (Sandbox Code Playgroud)

css tablesorter html-table class

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

class ×1

css ×1

date ×1

datetime ×1

datetime-format ×1

html-table ×1

php ×1

tablesorter ×1