2

I want to show my epub files on my site, so I'm thinking of creating my own reader in PHP. First I need to know how to read this file type.

Can I show the HTML files that are in the epub directly in the browser?

1 Answer 1

0

Yes, the files are 'real' HTML (or rather XHTML) and will work in any web browser.

6
  • Thank you for your answer! If I open an epub i can see the html files, these files are always there or they can be also in some subfolders?
    – CCT
    Commented Jun 22, 2016 at 13:37
  • Those files usually are in a directory calles OEBPS, but in theory, they could be anywhere (the file META-INF/container.xml points to them).
    – CL.
    Commented Jun 22, 2016 at 14:29
  • In the file you are mentioning i found this: <?xml version="1.0"?> <container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container"> <rootfiles> <rootfile full-path="content.opf" media-type="application/oebps-package+xml"/> </rootfiles> </container> it points only to the opf file.
    – CCT
    Commented Jun 22, 2016 at 16:42
  • So your content.opf is in the root directory?
    – CL.
    Commented Jun 22, 2016 at 19:17
  • Yes. But i need ti know where are the HTML files, I want to interpret them.
    – CCT
    Commented Jun 22, 2016 at 19:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.