Jump to content

how to export excel file in same server


stareagle

Recommended Posts

My first post - php newbie, so appreciate your support.

 

I'm currently using headers to save web page as excel file.

 

$filename="sms.xls";

header("Pragma: public");

header("Expires: 0");

header("Cache-Control: must-revalidate, post-check=0, pre-check=0");

header("Cache-Control: public");

header("Content-Description: File Transfer");

header("Content-Type: application/vnd.ms-excel");

$header="Content-Disposition: attachment; filename=".$filename.";";

header($header);

header("Content-Transfer-Encoding: binary");

@readfile($file);

 

I want to be able to save a copy to the server not to opening dialog save?

Not sure what I need to change or add to achieve this?

 

Have looked around and tried searching on here? - can't see the search threads feature if there is one?

 

Many thanks.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/187937-how-to-export-excel-file-in-same-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.