last modification time of the included files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lakilevi
Forum Newbie
Posts: 1
Joined: Tue Mar 23, 2010 3:25 am

last modification time of the included files

Post by lakilevi »

Hello.
I need to get in some way the maximum last modification time of my php files. The problem is that in many files I use include or require. So I need to know the last modification date of the included files.

Example:

inlude "config.php"

echo "Last modification time"
// here I should display the maximum last modification time of the actual file, and also of the file "config.php"

Which is the best way to do this? I don't want to change the code of the included files.

Thank you very much
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: last modification time of the included files

Post by Christopher »

Have you checked the manual for PHP's filesystem functions? There seem to be several that will give you various time information about a file:

http://us.php.net/manual/en/ref.filesystem.php
(#10850)
Post Reply