Jump to content

Folders Are Changing Last Modified Date Whenever They Are *accessed*

Recommended Posts

I have just noticed something really odd start happening on pretty much all my sites. The folder modified dates are being changed whenever a visitor just accesses the folder - yet nothing in the folder is being changed! I have several scripts that rely on the modified file/folder dates to determine when portions of the site were last updated, and now it thinks everything is in a constant state of update because the dates are changing whenever a web visitor just accesses the index file in the folder! This seems to be happening exclusively with folders that have a PHP index file. I tried creating the two folders and files detailed below as a test:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
print "<head><title>TEST</title>\n";
print "</head><body>\n";
print "<div id=\"Content\">\n";
print "TEST";
print "</div>\n";
print "</body>\n";


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<div id="Content">TEST</div>

Both files essentially output the same thing, yet when I access the /test/ folder in a web browser, then modified date of the /test/ folder is changed. When I access the /test2/ folder in the web browser, the folder date is not changed.


Why is PHP modifying the folder date when nothing is being written into the folder?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...