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

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

adding up might be solved tell us cheers.
i think i finally solved this anybody.

last time i was getting the wrong results.

Code

Help with simple query
Hi,

I'm trying to do a Query with a Union where I want to print the number of rows $tc conta

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

Big Problem!! Please help
Hi Guys,

Im making a website for a friend have encountered a really annoying problem. When ev

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

mod_rewrite.c on windows ??
why it's not working on windows while it's working on other hosts???

this is the code i got

Php - mysql select?
hi, i have this code:

Code: <?php
session_start();
// dBase file
include &quo

Problem writing URL into database
How would I write this into the database?

<?php echo "http://".$_SERVER['SER

dinamic "textboxes"?
Ey all, my first post here, i hope its not a hard one

I display mysql results in a table

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