mirror of
https://github.com/php/php-src.git
synced 2024-09-28 13:26:11 +00:00
18 lines
332 B
PHP
Executable File
18 lines
332 B
PHP
Executable File
<?php
|
|
|
|
/** tree view example
|
|
*
|
|
* Usage: php DirectoryTree.php <path>
|
|
*
|
|
* Simply specify the path to tree with parameter <path>.
|
|
*
|
|
* (c) Marcus Boerger
|
|
*/
|
|
|
|
$length = $argc > 3 ? $argv[3] : NULL;
|
|
|
|
foreach(new LimitIterator(new DirectoryTreeIterator($argv[1]), @$argv[2], $length) as $pathname => $file) {
|
|
echo "$file\n";
|
|
}
|
|
|
|
?>
|