Why does PHP include() not change file access time

2019-07-12 19:58发布

问题:

Why does PHP include() not change file access time? If it matters the system is Debian 4.6.3-14.

回答1:

If your filesystem has the relatime flag set (quite common nowadays) and the file already has access time newer than its modification time, it is not updated. This way there is less writing done on the disk. You can change this by removing that mount option, if you really have a reason to track access times.