phpでファイルの更新時刻からの経過時間を表示する例。

<html>
<head>
<title>ファイルの更新時刻からの経過時間を表示する</title>
</head>
<body>
<?php


$fileName = "test.php";
setlocale(LC_TIME, "ja");

if (file_exists($fileName)) {


    $string1 = strtotime(date("Y/m/d H:i:s", filemtime($fileName)));
    echo "<p>最終更新時刻:".date("Y/m/d H:i:s", $string1);


    $string2 = strtotime(date("Y/m/d H:i:s"));
    echo "<p>現在の時刻:".date("Y/m/d H:i:s", $string2);


    $string = ($string2 - $string1) / 60;
    echo "<p>現在の時刻との差は".$string."分です";

} else {

    echo "ファイルが見つかりません";

}

?>

30 Comments

  1. dich vu marketing says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/433 […]

  2. eBay music sale says:

    … [Trackback]

    […] Find More Information here on that Topic: dragon-ark.com/archives/433 […]

  3. best CBD oil says:

    … [Trackback]

    […] Read More Info here on that Topic: dragon-ark.com/archives/433 […]

  4. exchange online plan 2 says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/433 […]

  5. hp sunucu servis says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/433 […]

  6. hackear whatsapp online says:

    … [Trackback]

    […] Read More Info here on that Topic: dragon-ark.com/archives/433 […]

  7. best cc dumps says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/433 […]

  8. Sunucu Teknik Destek says:

    … [Trackback]

    […] Information to that Topic: dragon-ark.com/archives/433 […]

  9. world market link says:

    … [Trackback]

    […] Read More on to that Topic: dragon-ark.com/archives/433 […]

  10. Windshield marketing ideas says:

    … [Trackback]

    […] Read More Info here on that Topic: dragon-ark.com/archives/433 […]

  11. elojob says:

    … [Trackback]

    […] Read More on on that Topic: dragon-ark.com/archives/433 […]

  12. sagame says:

    … [Trackback]

    […] There you can find 82290 more Information to that Topic: dragon-ark.com/archives/433 […]

  13. sbo says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/433 […]

  14. UK Weekend getaways says:

    … [Trackback]

    […] Find More here on that Topic: dragon-ark.com/archives/433 […]

  15. local fucking website no registration says:

    … [Trackback]

    […] There you will find 25093 more Info on that Topic: dragon-ark.com/archives/433 […]

  16. สล็อตเว็บตรง says:

    … [Trackback]

    […] Find More on that Topic: dragon-ark.com/archives/433 […]

  17. Buy Springfield Firearms Online says:

    … [Trackback]

    […] Read More on that Topic: dragon-ark.com/archives/433 […]

  18. ล่องเรืออยุธยา says:

    … [Trackback]

    […] Read More here on that Topic: dragon-ark.com/archives/433 […]

  19. kardinal stick says:

    … [Trackback]

    […] There you can find 95890 more Info to that Topic: dragon-ark.com/archives/433 […]

  20. 파워볼사이트 says:

    … [Trackback]

    […] Find More to that Topic: dragon-ark.com/archives/433 […]

  21. Obama Runtz says:

    … [Trackback]

    […] Find More on to that Topic: dragon-ark.com/archives/433 […]

  22. cannahome market says:

    … [Trackback]

    […] There you can find 62935 more Info to that Topic: dragon-ark.com/archives/433 […]

  23. สล็อตวอเลท ไม่มีขั้นต่ำ says:

    … [Trackback]

    […] Info on that Topic: dragon-ark.com/archives/433 […]

  24. UFABET168 says:

    … [Trackback]

    […] Here you can find 19485 more Info on that Topic: dragon-ark.com/archives/433 […]

  25. Câmeras Privê Nomes says:

    … [Trackback]

    […] Find More Information here on that Topic: dragon-ark.com/archives/433 […]

  26. sendvic panel says:

    … [Trackback]

    […] Find More Info here to that Topic: dragon-ark.com/archives/433 […]

Leave a Reply