久艹网,亚洲一日韩欧美中文字幕2019,国产欧美日韩精品专区黑人,一区二区三区久久99

中山php|最優(yōu)網絡中山做網站 中山php建站

最優(yōu)良人

Posts Tagged With: word

php生成excel或者word文檔最簡單的方法

2011/09/29 at 16:29 » Comments (3,306)

以下代碼實現簡單輸出表格或者word文檔,如生成一個兩列的excel文檔,改動相應文件頭為 header("Content-type:application/vnd.msword"); header("Content-Disposition:filename=test.doc"); 就可以輸出.doc .xls等文件格式了 header("Content-type:application/vnd.ms-excel"); header("Content-Disposition:filename=test.xls"); echo "test1\t"; echo "test2\t\n"; //兩列之后換行 echo "test1\t"; echo "test2\t\n"; echo "test1\t"; echo "test2\t\n"; echo "test1\t"; echo "test2\t\n"; echo "test1\t"; echo "test2\t\n"; echo "test1\t"; echo "test2\t\n"; 附一個文件格式對應的數組 $mime_types = array( 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'jpe' => 'image/jpeg', 'bmp' => 'image/bmp', 'png' => 'image/png', 'tif' => ...more »