problem with content-disposition:inline

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Vantuykom
Forum Newbie
Posts: 19
Joined: Fri Jul 04, 2003 6:22 am

problem with content-disposition:inline

Post by Vantuykom »

Hi,

I'm having a problem generating an excel-file to the client-browser.
I've made a nice report with mysql and php, along with company-logo etc...
now I want to use it with:

Code: Select all

header("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition:inline; filename=test.xls");
On my developer-pc, this works fine, I get the excel-file perfectly in my browser, but when I want to do this from a remote pc, I get an excel-error and no output or just the php-code in the excel-file.
Than I've tried it with:

Code: Select all

header("Content-Type: application/vnd.ms-excel");
header ("Content-Disposition:attachment; filename=test.xls");
this works, but my logo and other images are not in the excel-file.
What am I doing wrong? I guess this is a security-issue, but how do I make this work???

please please help me...
Post Reply