Все вопросы: [filemtime]
4 вопросов
Accuracy of stat mtime in Windows
Have an example piece of (Python) code to check if a directory has changed: import os def watch(path, fdict): """Checks a directory and children for changes""" changed = [] for root, dirs, files in os.walk(path): for f in files: abspath = os.path.abspath(os.path.jo...
How-to watch mtime changes in course of php script?
I'm trying to watch for a file being modified in a long running php script. The basic algorithm is this: ... $mtime = filemtime($filename); sleep($delay); if($mtime < filemtime($filename)) ... // do something because file was changed elsewhere Problem is filemtime returns the same val...
filemtime() not working in Windows PHP-CLI
I just got PHP-CLI working on my Windows machine so I could create scripts using PHP. However, I'm trying to write a script to cleanup my Firefox downloads folder of files older than X number of days, but I can't seem to get the filemtime() function working. Here is the function I wrote: funct...
Как проверить, изменилось ли содержимое каталога с помощью PHP?
Я пишу сценарий фотогалереи на PHP, и у меня есть единственный каталог, в котором пользователь будет хранить свои изображения. Я пытаюсь настроить кеширование страниц и обновить кеш, только если содержимое каталога изменилось. Я думал, что могу сделать это, кэшируя время последнего изменения кат...