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

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -