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