You are here: Re: convert HTML string into csv/xls/doc « PHP Programming Language « IT news, forums, messages
Re: convert HTML string into csv/xls/doc

Posted by Gerard van Wilgen on 09/26/05 14:28

>>Shailesh<< wrote:
> CODE:
> $stuff = '<html><head><title>stuff</title></head><body><b>Hello</b>
> World</body></html>';
>
>
> header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); //
> Date in the past
> header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
> always modified
> header("Cache-Control: no-store, no-cache, must-revalidate"); //
> HTTP/1.1
> header("Cache-Control: post-check=0, pre-check=0", false);
> header("Pragma: no-cache"); //
> HTTP/1.0
>
>
> header("Content-type: application/msword; filename=stuff.doc");
> //header("Content-Disposition: attachment; filename=stuff.doc");
> echo $stuff;
>
>
> However, upon attempting to run this script I ran into the following
> error in IE:
>
>
> Internet Explorer could not open this script: test.php (note: I am
> trying to change it to be "stuff.doc"). Nothing ever showed up.

I do not know if this has anything to do with IE not being able to open
the document, but why do you specify a content-type of
"application/msword" when the document seems to be an HTML-document?


--

Gerard van Wilgen

www.majstro.com - Multilingual translation dictionary
www.erotikejo.com - International sex portal

 

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

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