how to export excel file in same server


Posted on 16th Feb 2014 07:03 pm by admin

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

No comments posted yet

Your Answer:

Login to answer
257 Like 51 Dislike
Previous forums Next forums
Other forums

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

How to replace search button with link?
hi to everbody.
i have a search submit form and button like this :

<form id="f

filesize() returns 0
I have a socket program that runs in an infinite loop, listening for connections, in this socket I h

Is there a way to override built in php functions without APD?
I am trying to use the
rename_function()
override_function()
options that are built into

Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that

need help with date function
i have following form for date

Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

To add a field on the screen XK02.
Hi All,

How to add an additional field in the vendor change control screen XK02.
The

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash