久久久久精品国产,丰满少妇粗大猛烈进高清播放,久久久97,在线18禁

<wbr id="x3zex"><nav id="x3zex"><em id="x3zex"></em></nav></wbr>

        <s id="x3zex"></s>
        1. <ruby id="x3zex"><nav id="x3zex"><acronym id="x3zex"></acronym></nav></ruby>
          <font id="x3zex"><noscript id="x3zex"></noscript></font>
          0712-2888027 189-8648-0214
          微信公眾號(hào)

          孝感風(fēng)信網(wǎng)絡(luò)科技有限公司微信公眾號(hào)

          當(dāng)前位置:主頁(yè) > 技術(shù)支持 > PHP > php根據(jù)當(dāng)前用戶(hù)信息時(shí)間顯示時(shí)間狀態(tài)的代碼片段

          php根據(jù)當(dāng)前用戶(hù)信息時(shí)間顯示時(shí)間狀態(tài)的代碼片段

          時(shí)間:2018-03-29來(lái)源:風(fēng)信官網(wǎng) 點(diǎn)擊: 736次
          php根據(jù)當(dāng)前用戶(hù)信息時(shí)間顯示時(shí)間狀態(tài)的代碼片段,以下代碼為項(xiàng)目開(kāi)發(fā)中的片段,實(shí)現(xiàn)方法思路僅供參考。
          <?php
          
          $created_at = !empty($v->created_at) ? $v->created_at : $v->created_at_as;
          $time_differents = time() - strtotime($created_at);
          $time_differents = round($time_differents/3600, 3);
          //返回當(dāng)前時(shí)間狀態(tài)
          switch ($time_differents) {
              case $time_differents <= 0.033:
                  $data[$k]->visit_time = '剛剛';
                  break;
              
              case $time_differents <= 0.033 && $time_differents < 1:
                  $data[$k]->visit_time = round($time_differents*60, 0).'分鐘前';
                  break;
          
              case $time_differents <= 1 && $time_differents < 24:
                  $data[$k]->visit_time = round($time_differents).'小時(shí)前';
                  break;
          
              case $time_differents <= 24 && $time_differents < 48:
                  $data[$k]->visit_time = '昨天';
                  break;
          
              case $time_differents <= 48 && $time_differents < 72:
                  $data[$k]->visit_time = '2天前';
                  break;
          
              case $time_differents <= 72 && $time_differents < 96:
                  $data[$k]->visit_time = '3天前';
                  break;
          
              case $time_differents <= 96 && $time_differents < 120:
                  $data[$k]->visit_time = '4天前';
                  break;
          
              case $time_differents <= 120 && $time_differents < 144:
                  $data[$k]->visit_time = '5天前';
                  break;
          
              case $time_differents <= 144 && $time_differents < 168:
                  $data[$k]->visit_time = '6天前';
                  break;
          
              case $time_differents <= 168 && $time_differents < 336:
                  $data[$k]->visit_time = '1周前';
                  break;
          
              default:
                  # code...
                  break;
          }
          

          您可能感興趣的相關(guān)文章:

          欄目列表
          推薦內(nèi)容
          熱點(diǎn)內(nèi)容
          展開(kāi)