<?php
$a = new DirectoryIterator("./");
foreach ($a as $v) {
if ($v->isFile()) $isF = " is a file "; else $isF = " is not a file ";
if ($v->isReadable()) $isR = ", is readable "; else $isR = ", is not readable ";
if ($v->isWritable()) $isW = ", is writable "; else $isW = ", is not writable ";
if ($v->isExecutable()) $isE = ", and is executable "; else $isE = ", and is not executable";
echo "Size of:". (string) $v . " is ". $v->getSize()." bytes. It". $isF $isR $isW $isE ."<br>\n";
}
highlight_file(__FILE__);
?>