I have to generate a word file from php. The report.doc is the file I have created to copy the contents of php to word file.
But the contents is not getting refreshed if I change any Name in the file. How to overwrite the file.
This is the example I have pasted here
<?
$filepnt = fopen("report.doc", 'w');
$content = '<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<TABLE BORDER=2 CELLPADDING=4 width="100%">
<TR> <TH COLSPAN=7>DATE AS ON </TH> </TR>
<TR> <TH COLSPAN=7>Netwrok</TH> </TR>
<TR> <TD>SL NO</TD><TD>NODE NAME</TD><TD>IP ADDRESS</TD><TD>HEAD NODE NAME</TD><TD>START TIME</TD><TD>END TIME</TD><TD>DURATION</TD> </TR>
<TR> <TD>1</TD> <TD>Hi</TD> </TR>
<TR> <TD></TD> <TD>0283</TD> </TR>
</TABLE>
</body>
</html>';
fwrite($filepnt,$content);
echo "<a href=\"report.doc\">Download as .doc</a>";
fclose($filepnt);
?>