タグ

2012年5月18日のブックマーク (2件)

  • やつはジョンだ | tips » Blog Archive » [php] ファイルを更新日付順でソートする

    PHPでファイル取得して更新日付順でソートしたいなと思ったけど、やり方なかなかヒットしなかったので、書くことにした。 手順としては、ディレクトリ内のファイルを取得する際にそのファイルの日付も一緒に取得しておく。最後に配列に保存したファイルを、日付順でソートする流れとなる。 $dir = opendir(directory_name); $file_list = array(); //ファイル名を保存する配列 $time_list = array(); //ファイルの日付を保存する配列 while (false !== ($file = readdir($dir))){ //ディレクトリ走査 //先頭文字が"." のファイルを除外 if($file[0] != "."){ $time_list[] = filemtime($dir_name.$file); //ソート用にファイル時刻を取得

    ytumagar
    ytumagar 2012/05/18
    file data sort php
  • Loading…

    Videos Watch and learn from our engineers as they show how to bring the latest web technologies to your websites on Safari. Watch Safari and Web Videos Forums Ask questions and discuss a variety of web development topics with Apple engineers and other developers. Apple Developer Forums Safari Extensions Safari extensions are a powerful way to add new features to Safari. They are built in Xcode wit

    Loading…
    ytumagar
    ytumagar 2012/05/18
    Safari Extention 機能拡張 開発ガイド