You are here: Excel files from Database (firefox / IE difference) « All PHP « IT news, forums, messages
Excel files from Database (firefox / IE difference)

Posted by John on 10/10/01 11:39

Hi,

I'm using php to provide Excel files stored in a database to web users.
The important part of my code is this:

$buffer = mysql_result($result, 0, 'survey');
header("Content-type: application/excel");
header("Content-disposition: attachment; filename=test.xls");
echo($buffer);

This works perfectly with firefox, but not at all with IE.

I just get the pop-up "Internet Explorer cannot download viewdoc.php
from <site_name>. Internet Explorer wa snot able to open this Internet
site. The requested site is eitherunavailable or cannot be found. Please
try again later.

Any suggestions?

BTW, if i change the content type to application/vnd.ms-excel, all it
does is give me a security warning before providing the same error message.

John

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация