GetMemoMax.php 278 B

12345678910
  1. <?php
  2. $max = 0;
  3. foreach (new DirectoryIterator('Memo/') as $fileInfo) {
  4. if ($fileInfo->isDot()) continue;
  5. $current = pathinfo($fileInfo->getFilename())['filename'];
  6. if (!is_numeric($current)) continue;
  7. if ($current > $max) $max = $current;
  8. }
  9. echo json_encode($max);
  10. ?>