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.

Did you know?Explore Trending and Topic pages for more stories like this.
$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

use an array from 1 class in a second class
I have a class that adds data to an array

Then I have a second class and I need to check if t

PHP not creating file.
Its supposed to create a .ini file in the /scriptfiles/users/ with the name they entered into the fi

Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo

Values disappear from my array :( HELP!
hey all, I have a lil mysql/php/apache script that queries a database
and pulls put 5 integers.

Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rew

User information
Hi All,
By using t-code SUIM we get all the user details,if suppose we donot have permission t

Output Buffering question
Hi all,

I've been trying to wrap my head around output buffering. So far I've found tons of

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

php wont update my db
hello,

sorry for posting in mysql forum but i dont know where exactly is the problem but here

Using unserialize()
Hi there.

I have some data in my database that is serialized.

e.g.

a:2:{i:0

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