php列目录

  • 利用glob函数
    1
    foreach (glob("./*") as $filename) {  echo $filename."<br>"; }
    The glob() function searches for all the pathnames matching pattern according to the rules used by the libc glob() function, which is similar to the rules used by common shells.
  • 利用DirectoryIterator对象
    1
    $d=new DirectoryIterator("glob:///var/www/html/f*");var_dump($d);
  • 使用scandir()
    1
    $dir="./";$file=scandir($dir);print_r($file);

    php读文件

  • highlight_file()
    1
    2
    $a = highlight_file('flag');
    echo $a;
  • show_source()
    1
    show_source("flag.txt");

    使用dvcs-ripper恢复svn文件

    https://github.com/kost/dvcs-ripper