<?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); ?>
echo "<table width= 100%><form action='edit.php' method='post'>"; 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 "<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>" ;
<?php /* файлменеджер */ $dir = opendir("./"); chdir("./"); echo "<html><head><title>Файлменеджер</title></head><body>"; echo "<h1>Оглавление каталога</h1><p>"; echo "<table width= 100%><form action='edit.php' method='post'>"; 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 "<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); ?>
<input type=radio name=config.php value=config.php>config.php</td><td>0</td><tr>edit.phpedit.php<tr><td><input type=radio name=edit.php value=edit.php>
<?php echo "<html><head><title>Файлменеджер</title></head><body>"; echo "<h1>Оглавление каталога</h1><p>"; echo "<table width= 100%><form action='edit.php' method='post'>"; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_dir($file)) echo $file."</td><td>Каталог</td>"; if (is_file($file)) echo "<input type=radio name=".$file." value=file>".$file." (Размер:".filesize($file).")</td>\n<br>"; } } closedir($handle); } echo "<input type=submit name=Edit value=Edit></form></table></body></html>" ; ?>
<?php echo "<html> <head><title>Файлменеджер</title></head> <body> <h1>Оглавление каталога</h1><p> <form action='edit.php' method='post'>\n"; if ($handle = opendir('.')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_dir($file)) echo $file." (каталог)<br>\n"; if (is_file($file)) echo "<input type=radio name=".$file." value=file>".$file." (файл,размер: ".filesize($file).")<br>\n"; } } closedir($handle); } echo "<input type=submit name=edit value=edit> </form> </body> </html>"; ?>