list_dir.php 236 B

12345678910111213
  1. <?php
  2. //error handling
  3. ini_set('display_errors', 1);
  4. error_reporting(E_ALL);
  5. $dirs = array_filter(glob('../callbacks/*'), 'is_dir');
  6. foreach($dirs as $dir)
  7. $names[] = basename($dir);
  8. //print_r($names);
  9. echo json_encode($names);
  10. ?>