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

257 Like 51 Dislike
Previous php-forum Next php-forum
Other php-forum

2 decima places & How to reload my page
Hello There,

How do i put full-stop (.) after second figure from behind? ie if i have 123456

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

Parse Error
Hi Guys,

I have a function in my class which returns a string link variable. The problem is i

php and downloading
I want to use a php script to create two files. Then I want it to redirect (or whatever) to have tho

PHP, jAVASCRIPT setting input values, why isn't it working?
Hi:

I am calling this javascript:
<script language="javascript">

Email/MMS to Site
Hey guys. I'm looking for a way for a user to upload images and/or text via their cell phones. It

php title problem
Hi,

I am having a problem managing my page title with PHP.

Currently I have my <

PHP & MS Access - Line Break
Hey Guys!

I'm pulling records from an MS Access database and listing them using PHP and I'm r

How to ask a regex question?
Hi, I thought I'd share some of my insight after seeing too many bad questions that either get ignor

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