Answer the question
In order to leave comments, you need to log in
How to download a file in xlsm format from the server?
Hello! I download the file with the following code:
header("Content-Type: application/vnd.ms-excel; charset=utf-8");
header("Content-Disposition: attachment; filename=Templ10.xlsm");
echo file_get_contents('uploads/Templ10.xlsm');
Answer the question
In order to leave comments, you need to log in
Specify an absolute path. It seems that he stupidly cannot find the file.
Pass it right , don't use file_get_contents.
See 3 approach (at most 2)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question