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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -