Ashesh Bharadwaj - 2012-06-05 15:21:26
I am not able to load the epub in iPad. When I unzipped the epub file using winrar, it is showing this error:
Cannot create META-INF\container.xml
The system cannot find the path specified.
After the unzip operation the folder only contains a 0 byte META-INF file.
I isolated the following code and tested it using PHPZip class but still the same error:
$zip->addDirectory("META-INF//");
$content = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<container version=\"1.0\" xmlns=\"urn:oasis:names:tc:opendocument:xmlns:container\">\n\t<rootfiles>\n\t\t<rootfile full-path=\"book.opf\" media-type=\"application/oebps-package+xml\" />\n\t</rootfiles>\n</container>\n";
$zip->addFile($content, "META-INF/container.xml");