NYCPHP Meetup

NYPHP.org

PHP headers and Mac Machine Downloads

LY heli_travel at yahoo.com
Wed May 7 12:02:37 EDT 2003


Hi Folks,

I got a very interesting question. When I try to use PHP to
produce a dowload file, I usually use header, like this:


header("Content-Type: application/vnd.ms-excel;
charset=$dest_charset");
print(" " . $content); 

I print the very long string out with a specfic header
information.

This code works fine on windows, linux machines, but it doesn't
work for Mac. Mac will download an url instead of a excel file.
the above code, will give me aa abc.xls file on windows and
linux, but will give me an url, like
this"http://www.abc.com/app.shtml?nam=a&execid=1212" on Mac, and
I can't open it!

This things bother me a lot, Could some one help me out:

1)Do I need to configure browser on that Mac to plug in some
applications?

2)How to change the header to let Mac to download an excel file
with a specified name and extension instaead of a
url(http://www.abc.com/app.shtml?nam=a&execid=1212)

Thanks for your help!





__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com



More information about the talk mailing list