From 3d6790614bb0dc776e02a95835e5c274263d1d1a Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Nov 2011 11:22:36 -0500 Subject: This zip file was identified as ltshell-3.zip --- shell/bin/ls.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 shell/bin/ls.php (limited to 'shell/bin/ls.php') diff --git a/shell/bin/ls.php b/shell/bin/ls.php new file mode 100644 index 0000000..fa01f2e --- /dev/null +++ b/shell/bin/ls.php @@ -0,0 +1,34 @@ +1) { echo $name.":\n"; } + $files = array(); + while (false !== ($file = readdir($dh))) { + $files[]="$file"; + } + sort($files); + echo implode("\n",$files)."\n"; + closedir($dh); + } + } else { + echo $name."\n"; + } + } else { + echo $me.': file does not exist: `'.$name."'\n"; + $ret++; + } + } + return $ret; +} -- cgit v1.2.3