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

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.

I am working on a application wh

How to login with SAPCPIC userid
I have changed the Password for SAPCPIC in Development Server for 000,001 and 100 client.
But w

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

eregi to preg
Im converting my regex for php 5.3 and I am stuck on the following

Code: [Select]if((eregi(&q

Problems with adding a link to one position in a 'foreach' loop, please help
Hello!

Iam pretty new to programming and I wanna create a table with users from an array. It

Date Format
Hi there,

I have a date format like this right now:
Sat, 17 Oct 2009 17:04:00

I ne

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

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