Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8099449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:24:50+00:00 2026-06-05T22:24:50+00:00

I personally know limited PHP, however I have a script provided by another, that

  • 0

I personally know limited PHP, however I have a script provided by another, that I have tweaked a bit

<?php

function getFiles($dir)
{
    $arr=scandir($dir);
    $res=array();
    foreach ($arr as $item)
    {
        if ($item=='..' || $item=='.'){continue;}
        $path=$dir.'/'.$item;
        if (is_dir($path))
        {
            $res=array_merge($res,getFiles($path));
        }
        else
        {
            $res[$path]=fileatime($path);
        }
    }
    return $res;
}

 $files=getFiles(dirname('Manuals'));
 arsort($files);
 $files=array_slice(array_keys($files),0,11);
 foreach ($files as $file)
 {
 $URL=$file;
 $file = trim(substr($file, strrpos($file, '/') + 1));
 $file = str_replace(".pdf", "", $file);
     echo '<!--<li style="margin-left: -25px; white-space: pre;">--><a href="'.$URL.'" title="'.$file.'">'.$file.'</a><br />';
 }

?>

changing the previous filemtime to fileatime in “$res[$path]=fileatime($path);”

from what I gather, this should show the last time the file is accessed, however it appears to function no different than filemtime or filectime. Perhaps the server is not updating the time accessed? (all files are html, php, and pdf)

any idea if this is a permissions thing? server thing? code thing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:24:52+00:00Added an answer on June 5, 2026 at 10:24 pm

    You might see one of two effects:

    • On many webservers, the filesystems carrying the web data are mounted noatime to save the expensive IO of updating atime for every request.

    • PHP’s fstat cache tends to have a life on its own: use clearstatcache() to overcome this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that in a stylesheet div#name and #name do the same thing. Personally
When we have new in C#, that personally I see only as a workaround
I know that Entity Framework supports Partial trust, I personally blogged about that It
Personally, I try and write secure ASP.NET code. However, I have become quite paranoid
I have some sgml files that are roughly standardized. However, there can be data
I know that in the architectures I'm personally familiar with (x86, 6502, etc), the
I know the various frameworks have their benefits, but I personally want my web
I know about the unwanted behaviour of PHP's function strtotime For example, when adding
I personally do not like programming languages being case sensitive. (I know that the
Most of you might have known already that godaddy does'nt have any plugins or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.