Useful PHP script


SUBMITTED BY: Guest

DATE: Oct. 17, 2013, 4:08 p.m.

FORMAT: Text only

SIZE: 300 Bytes

HITS: 1437

  1. // get all php files AND txt files
  2. $files = glob('*.{php,txt}', GLOB_BRACE);
  3. print_r($files);
  4. /* output looks like:
  5. Array
  6. (
  7. [0] => phptest.php
  8. [1] => pi.php
  9. [2] => post_output.php
  10. [3] => test.php
  11. [4] => log.txt
  12. [5] => test.txt
  13. )
  14. */

comments powered by Disqus