Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   Export php file to word file (http://www.go4expert.com/forums/export-php-file-word-file-t23235/)

remosathya 7Sep2010 14:57

Export php file to word file
Dear friends,

i want export the page to word file. Here only the HTML is taking.The php data is not displaying .Why

Thanks in advance.

Max2010 17Oct2010 00:14

Re: Export php file to word file
hm you mean that you want the php script to be exported in word?
you can do like this:

header("Content-type: application/x-ms-download");
header("Content-Disposition: attachment; filename=$ExcelFileName");
header('Cache-Control: public');


echo 'php';
whatever you want to write here
including a php script
it will be included in a string and then
go in the output for a doc file


echo $content;

All times are GMT +5.5. The time now is 14:32.