久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      php怎么獲取當(dāng)前時(shí)間

      php怎么獲取當(dāng)前時(shí)間

      一、獲取當(dāng)前時(shí)間戳

      方法1:通過time函數(shù)

      time();

      方法2:通過$_SERVER中的REQUEST_TIME元素

      $_SERVER['REQUEST_TIME'];

      方法3:通過strtotime函數(shù)

      strtotime('now');

      二、獲取當(dāng)前時(shí)間

      通過date函數(shù)格式化時(shí)間戳

      echo date('Y-m-d h:i:s', time()); // 2018-10-3 15:57:05

      三、時(shí)區(qū)問題

      上述方法都存在時(shí)區(qū)問題,具體解決:

      方法一:php.ini中修改為中國時(shí)區(qū)

      date.timezone = PRC

      方法二:在php文件中臨時(shí)設(shè)置為中國時(shí)區(qū)

      date_default_timezone_set('PRC');

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)