My purpose for it, is to view the file within the $file variable, which is my journal file, basically i want it to view the last time it was updated, IE: last time I used fwrite to add an extra journal entry. If so I want it to then print that when i include this file on my main page. Otherwise, I want it to leave it alone. Hence the evaluation "< 2" with the time.
Thanks for any advice in advance
Code: Select all
<?php
$img = "<img src=http://www.akimm.com/images/new1.gif>";
$file = "journal06/journal/journalaug_sept.txt";
if(file_exists($file) {
if(round(time()) - fileatime($file)/3600/24 =< 2) {
echo "<ul>" . "<li>" . $img . "<a href=http://www.akimm.com/journal06/journal.php>" . "Click to view new journal entrys " .
"</a>" . "</li>" . "</ul>";
}
}
?>