title: Codeigniter zip all files and download
body: <p>I have problem how I can download files from my server. I send my files to spec directory and saving infos about these files into my database. Inside my model i create function to get infos about single uploaded file:</p>
  
  <pre><code>public function getAllFiles($unique_id) {
      $query = $this-&gt;db-&gt;query("SELECT * FROM download_files WHERE unique_id = '$unique_id'");
      return $query-&gt;result();
  }
  </code></pre>
  
  <p>now, Inside my View I can display name etc. about file- but I dont have any idea how I can download ALL files in single file (ZIP). </p>
  
  <p>My Loop inside View is:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;?php foreach($getAllFiles as $row): ?&gt;
      &lt;li&gt;&lt;?php echo $row-&gt;file_name; ?&gt;&lt;/li&gt;
      &lt;?php endforeach; ?&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I know to do this I must use ZIP Library but I can't use it :( Anyone can help me ?</p>
  
  <p>THANKS!</p>