2016-10-19 8 views
-1
<table id="b" class="table table-hover" border="1" cellspacing="0" cellpadding="5"> 
      <tr> 
       <th>Serial No</th> 
       <th>Student Name</th> 
       <th>Student ID</th> 
       <th>Point ID</th> 
       <th>CV</th> 
       <th>USI</th> 
       <th>Reference</th> 
       <th>Academic Certificate</th> 
       <th>Training Documents</th> 
       <th>Pay Slips</th> 
       <th>Work Pictures</th> 
       <th>Other Documents</th> 
       <th>Work Documents</th> 
       <th>Applicants Form</th> 
       <th>Employer Form</th> 
       <th>Action</th> 

      </tr>     
     <?php 

      $result = mysql_query("select * from student_portal"); 
      while($row = mysql_fetch_array($result))      
    { 
     ?> 

     <tr> 
      <td><?php echo $row['id']; ?></td> 
      <td><?php echo $row['name']; ?></td> 
      <td><?php echo $row['student_id']; ?></td> 
      <td><?php echo $row['point_id']; ?></td> 
      <td><?php echo $row['cv']; ?></td> 
      <td><?php echo $row['usi']; ?></td> 
      <td><?php echo $row['reference']; ?></td> 
      <td><?php echo $row['academic_certificate']; ?></td> 
      <td><?php echo $row['training_documents']; ?></td> 
      <td><?php echo $row['Pay_slips']; ?></td> 
      <td><?php echo $row['work_pictures']; ?></td> 
      <td><?php echo $row['other_documents']; ?></td> 
      <td><?php echo $row['work_documents']; ?></td> 
      <td><?php echo $row['declaraction_form']; ?></td> 
      <td><?php echo $row['declaraction_employer']; ?></td>    
     </tr> 

여기에 코드가 있습니다. 모든 파일을 zip 형식으로 다운로드하고 싶습니다. zip 파일에서 모두 폴더에 있음.ziparchive 또는 다른 PHP 스크립트가 zip 폴더의 모든 파일을 다운로드하고 싶습니다.

답변

0

아마도 출력 HTML 파일을 만들고 PHP 지퍼 기능을 통해 실행해야합니다.

다음은

function unzip_file($location,$newLocation){ 
if(exec("unzip $location",$arr)){ 
    mkdir($newLocation); 
    for($i = 1;$i< count($arr);$i++){ 
     $file = trim(preg_replace("~inflating: ~","",$arr[$i])); 
     copy($location.'/'.$file,$newLocation.'/'.$file); 
     unlink($location.'/'.$file); 
    } 
    return TRUE; 
}else{ 
    return FALSE; 
} 

}

+0

전체 코드를 제공하십시오를 시작하는 데 하나입니다. –