[eluser]underparnv[/eluser]
I'm just going to dive right here. Here is my code:
Code:
<?php
$this->load->library("zip");
$file_location = "http://www.example.com/pdfs/file_name.pdf";
$file_name = basename($file_location);
$file_data = file_get_contents("./pdfs/" . $file_name);
$file_id = 1;
$name = "/" . $file_id . "/Sample.pdf";
$this->zip->add_data($name, $file_data);
$this->zip->archive('./pdfs/to_board/' . $hearing_date . '.zip');
?>
The above produces a file that is 20,258kb in size but has no data whatsoever in it.
When I add simply the directory manually I do get the folders, but no files within the folders. Why? Am I doing something wrong?
Thanks in advance,
underparnv