<?php /* файлменеджер */ $dir = opendir("./"); chdir("./"); echo "<html><head><title>Файлменеджер</title></head><body>"; echo "<h1>Оглавление каталога</h1><p>"; echo "<table width= 100%>"; while ($d=readdir($dir)) { $file = basename($d); echo $file; //$file = is_file($d); echo $file; echo "<tr><td>"; if (is_dir($d)) echo "$d</td><td>Каталог</td>"; if (is_file($d)) echo "<form action='edit.php' method='post'><input type=radio name=".$file." value=file>$d</td><td>".filesize($d)."</td>"; echo "<tr>"; } echo "<input type=submit name=Edit value=Edit></form></table></body></html>" ; closedir($dir); ?>