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

Results 1 to 2 of 2
  1.     
    #1
    Member
    Website's:
    heroturko.biz softpk.com gfxtra.biz hotfilegfx.com

    Default i need your help for directory listing

    hello

    File show that there is need to download it but do not download..

    Means the download link is not working please help me


    my script is:

    PHP Code: 
    <div class="fixed_page content">    
                    
                    <div class="box grid_16 alpha single_datatable001">
                      <div id="dt1" class="no_margin">
                        <table class="display datatable">
                       <?php

    /* get the actual directory path */
    $pwd=getcwd();
    /* Make sure you end the filepath with a slash */
    $checkDir ".";


            echo 
    "<thead>";
            echo 
    "<tr>";

    /* open the current directory */
    $handle=opendir($checkDir);

    /* the table descriptions */
    echo "<th width='200'>File Name</th><th>Size</th><th>Date</th><th>Download</th>";
    echo
    "</tr>";
    echo
    "</thead>";


    echo
    "<tbody>";

           
    /* a while loop to get all files in the actual directory */
    while (false !== ($file readdir ($handle)))
    {    if (
    $file != "." && $file != ".." && $file != "index.php" && $file != "upload")
        {    
    /* all needed file details */
               
    $size=filesize($file);
            
    $total=$size+$total;
            
    $inode=fileinode($file);
            
    $type=filetype($file);
            
    $date=date("M d, Y @ h:ia"filemtime($file)); 
            
    $perms=fileperms($file);
            
            echo
    "<tr class='gradeX'>";
            
            if (
    $type == "dir")
            {
            echo
    "<td><a href=$file>$file</a></td>"; }
            else
            {
            echo
    "<td><a href=$file>$file</a></td>"; }
            echo
    "<td align='center'>$size</td>";
            echo
    "<td align='center'>$date</td>";
            echo
    "<td align='center'><a href=$file>Download</a></td>";
            

            
            
        }
    }
    /* close the table */
    echo"</tr>";
    echo
    "</tbody>";



    /* close the directory */
    closedir($handle);

    ?> 

                        </table>
                      </div>
                    </div>

    softpk Reviewed by softpk on . i need your help for directory listing hello File show that there is need to download it but do not download.. Means the download link is not working please help me my script is: Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Replace
    PHP Code: 
    echo"<td align='center'><a href=$file>Download</a></td>"
    With
    PHP Code: 
    echo"<td align='center'><a href='"http://linktofilefolderlocated.com/' . $file . '"'>Download</a></td>"; 

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 31st Jan 2012, 04:13 AM
  2. Premium Directory Listing for FREE
    By KWWHQuicko in forum Completed Transactions
    Replies: 5
    Last Post: 17th Jan 2012, 08:19 PM
  3. Filehost listing
    By SlingFile in forum File Host Discussion
    Replies: 2
    Last Post: 22nd Nov 2011, 04:25 PM

Tags for this Thread

BE SOCIAL