在doc中转换文档

$filename = $file."_".date("Y-m-d");
header("Content-type: application/vnd.ms-excel");
header("Content-disposition: csv" . date("Y-m-d") . ".csv");
header( "Content-disposition: filename=".$filename.".csv");
print $csv_output;
exit;

help of this i can convert a file into CSv but i want a file into .doc when i change the header it ill not convert the file it not able to pik data from the database

how can i change a file in .doc

One possible way is to use COM interface to control Word application and create word document that way. Check this link for details.

You could also take a look at JODConvert. It's a java based tool. but can easily be called from PHP by using the passthru or shell_exec functions