1

Say I've got two dirs, foo and bar. Both have got a file 'test.php'. I'd like to check if the copy of test.php in bar is newer than the one in foo. How can I do this? I'm using windows XP but would prefer a cross platform solution, though if that's possible, windows only would work too.

Edit: Only need to check text files containing code, e.g: php, javascript, css, and html files. No need to check for images though if that could be checked it'd be a bonus.

4 Answers 4

3

Use: filemtime($filename)

Sign up to request clarification or add additional context in comments.

Comments

2

filemtime should work for you.

Comments

1

You could try to use filemtime which should tell the last modified timestamp

Comments

1

Use filemtime

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.