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

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

Whats wrong with my query?
I am trying to get this query to show the appropriate ticked vehicle roof height, unless no boxs are

Inserting Data into a MS Access DB using PHP.
As part of my uni course I am doing a placement at a company whom want me to create a client zone fo

Displaying image from database
Hi,

I've got a site where that's got a database behind it. Currently it has loads of items in

Sort a two dimensional array.
Hi. I've set up a two dimensional array that reads as follows:

Code: $modifiedData = array(

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Multiple Dropdown Selections
I have a form that let's a user insert a page with the ability to select categories. I want them to

. and .. appearing instead of pictures
First of all, thanks very much for providing this forum. It is very much appreciated!

My son

Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

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