Activity Stream
48,167 MEMBERS
64900 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 10 of 10
  1.     
    #1
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro

    Default Filemanager In php (HELP)

    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:

    PHP Code: 
    <?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);
    }
    ?>
    saninokia Reviewed by saninokia on . Filemanager In php (HELP) 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: <?php $filespath = dirname(__FILE__)."/files/"; if ($dir = opendir($filespath)) { $images = array(); while (false !== ($file = readdir($dir))) Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    great i'm also working on the similar mod.. for rapidleech will take a look tonight..

  4.     
    #3
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    remove </table></div> from the loop

  5.     
    #4
    Respected Member
    Try this:
    PHP Code: 
    <?php 
    $filespath 
    dirname(__FILE__)."/files/"
    if (
    $dir opendir($filespath)) 

     
    $images = array(); 
     while (
    false !== ($file readdir($dir))) 
         { if (
    $file != "." && $file != "..") {$images[] = $file;} } 
        echo 
    "<div id='filelist'><table width='400px' align='center'><tr align=center><td>Click</td><td>Files</td><td>File Size</td></tr>";
        foreach(
    $images as $image
        { 
            
    $size filesize($filespath.$image).' KB';
            echo 
    "<tr align=center><td><input type='checkbox' name='files[]' value='$image' /></td><td>$image</td><td>$size</td></tr>";
        } 
        echo 
    '</table></div> ';
        
    closedir($dir); 

    ?>

  6.     
    #5
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    Thx Lock Down Its Works.You Are My Hero,hurreeeeyyyy.hehe.

  7.     
    #6
    Respected Member
    You are welcome.

  8.     
    #7
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    how to select 1 or 2 file from filelist using checkbox? for more action like edit,delete.

  9.     
    #8
    Respected Member
    You add a 2nd and 3rd < input check box one for edit and one for delete.

  10.     
    #9
    Member
    Website's:
    WarezRocker.info Share4U.org Imdb.WarezRocker.info DownTurko.org Host-Palace.com HeroTurko.pro
    thanks i am done.

  11.     
    #10
    Respected Member
    You are welcome.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Rapidshare Filemanager [How to see more than 3000 Files in Filemanager]
    By astalavistia in forum Webmaster Discussion
    Replies: 6
    Last Post: 16th May 2012, 10:06 PM
  2. public filemanager script
    By rajeshjsl in forum Webmaster Discussion
    Replies: 3
    Last Post: 24th Feb 2011, 04:43 PM
  3. PHP script to grab all files from MU filemanager
    By Yawn92 in forum Webmaster Resources
    Replies: 2
    Last Post: 31st Jul 2010, 06:03 PM

Tags for this Thread

BE SOCIAL