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

python - What's the Pythonic way to report nonfatal errors in a parser? -

sql server - Deadlock occuring in Clustered Columnstore index -

php - curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to domain.com:443 -