Force Download a file with filename using PHP
To force download a file and specifying a filename we need to send the header as below
header('Content-Disposition: attachment; filename="somefile.someextn"');
if we do not specify the content disposition the the file tends to open in the browser.
hope it helps
header('Content-Disposition: attachment; filename="somefile.someextn"');
if we do not specify the content disposition the the file tends to open in the browser.
hope it helps
Comments
Post a Comment