Welcome Guest, Not a member yet? Register   Sign In
CI Zip Encoding Library Help
#1

[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


Messages In This Thread
CI Zip Encoding Library Help - by El Forum - 01-09-2009, 11:18 AM
CI Zip Encoding Library Help - by El Forum - 01-09-2009, 11:25 AM
CI Zip Encoding Library Help - by El Forum - 01-09-2009, 11:30 AM
CI Zip Encoding Library Help - by El Forum - 01-09-2009, 11:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB