Created
May 10, 2015 09:11
-
-
Save faizanayubi/7a6de64bdce182f0bd60 to your computer and use it in GitHub Desktop.
Creating Word Document with PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header("Content-type: application/vnd.ms-word"); | |
header("Content-Disposition: attachment;Filename=document_name.doc"); | |
echo "<html>"; | |
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=Windows-1252\">"; | |
echo "<body>"; | |
echo "<h1>My first document</h1>"; | |
echo "</body>"; | |
echo "</html>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment