First off, thank you for creating this. This is exactly what I needed.
Working from your Example2.php file, I created a version that reads in values from a database (title, author, body, etc.) and generates an epub file.
For some reason, however, when I download the file and run epubcheck on it, I get the I/O error listed above, and the file doesn't work.
The only differences with my code were
1) data was dynamically added
2) for now, all is added in one chapter
3) I didn't use the EPubSplitter functionality (instead setting the fourth field in book->addChapter = true)
I really doubt that the first two differences are relevant (and I have verified that the data is actually populating where necessary).
I expanded the .epub files (renamed to .zip) and compared the contents of TestBook2 and myBook, and as far as I can tell, the content is the same.
Asbjorn Grandt - 2011-01-08 16:13:36 - In reply to message 4 from ann castro
The problem in this case was that the PHP script calling the Epub class were adding a bit of HTML code to the end of the Epub file (which is just a zip file with a different extension name).
It was easily solved.
When sending files, as the Epub class does, the calling scripts must not send the HTML header or add any bytes to the stream, as that will result in corrupted files. Though WinRar, WinZip and similar tools can still open them, EpubCheck have a check to ensure the generated files doesn't have superfluous data.