RU beehive logo ITEC dept promo banner
ITEC 325
2014spring
ibarland

homelectshws
D2Lbreeze (snow day)

lect07-dates
times and dates


File timestamps

When looking at files, it can be nice to include their most recent modification time.

Before calling filemtime (which takes in a file-name, and returns a date):

  ; Either:
  ini_set('date.timezone','America/New_York');
  date_default_timezone_set('America/New_York');

  echo strtotime('2012-Feb-08 11:03:27');   // don't use '2012.Feb.08 ...'; it returns null.
  echo date('Y-M-d H:m:s',234234234);

Look at the documentation for scandir.
Since it returns an array of filenames, it's a natural match to use with other functions that want an array of strings: For example, echo htmlLines( scandir( '/ibarland/Tmp' ) );

homelectshws
D2Lbreeze (snow day)


©2014, Ian Barland, Radford University
Last modified 2014.Feb.10 (Mon)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Powered by PLT Scheme