i am making a php based filemanager but getting some problem,i am trying to show all files from a directory with checkbox system and in a table,but if only 1 file is stored in the directory then its ok but if many files then its not fit in the table list.i need help,please guys.
my code is:
my code is:
PHP:
<?php
$filespath = dirname(__FILE__)."/files/";
if ($dir = opendir($filespath))
{
$images = array();
while (false !== ($file = readdir($dir)))
{
if ($file != "." && $file != "..")
{
$images[] = $file;
}
}
?>
<div id="filelist">
<table width="400px" align="center">
<tr><td>Click</td><td>Files</td><td>File Size</td></tr>
<?
foreach($images as $image)
{
?>
<tr><td><input type="checkbox" name="files[]" value="<? echo $image;?>" /></td><td><? echo $image;?></td><td><? echo filesize($filespath.$image)."KB";?></td></tr>
</table>
</div>
<?
}
closedir($dir);
}
?>