It depends on what you mean by "changed". If you require that the contents actually be modified, then checking filemtime
is not enough - it's a fantastic first step, and should be used first, but it is not sufficient on its own.
Conbine the filemtime
with a hash of the file's contents (such as md5_file
) and it will work efficiently.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…