xiuno教程:本站已运行了多少天”代码(php版) xiuno

xiaocao (UID:1) 1天前 12

1_D87K2699TPJWFKH.jpg

    <?php
    $sitestart = strtotime(“2010-4-15″); //获取特定时间戳
    $sitenow = time(); //获取服务器当前时间戳
    $sitetime = $sitenow – $sitestart; //时间戳相减
    $sitedays = (int)($sitetime/86400); //转换为天数
    echo ‘本站已安全运行 ‘.$sitedays.’ 天’; //输出显示
    ?>

 

最新回复 (0)

你可以在 登录 or 注册 后,对此帖发表评论!

返回
发新帖