I want to open an .epub document with PHP, to modify it (for example to add some text on the first page and last page) and to save it back to .epub I found some classes for saving a text into epub file, but I can't find anything about opening an epub in PHP.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
epub
files are just HTML+CSS files inside a ZIP archive (called the Open Container Format (OCF)) files with a different file extension :) So you can use PHP's ZipArchive class to work on the file.
回答2:
There are libraries that support EPUB files. BookGlutton is one.