How to create '.epub' extension file using php? -


i'm building web application should create '.epub' extension files text content exist on mysql database, fetch data mysql database unable create '.epub' file. there way create '.epub' file using php script.

just specify content-type using header() , echo out content database:

header('content-type: application/epub+zip'); echo $data; 

if need force browser download file, can use following:

header('content-description: file transfer');  header('content-type: application/epub+zip');  header('content-disposition: attachment; filename="mybook.epub"');  echo $data; 

Comments

Popular posts from this blog

go - serving up pdfs using golang -

python - Best design pattern for collection of objects -

sharepoint online - C# CSOM SPView ListItemCollection did not update after I add new field in the SP view -