I try to read a file and send the whole content out then delete that file. When I did as the following, seems the content didn't "print" properly which cuase an error on browser. If I remove "unlink", it works fine. It could be a timing problem. Is there any way to fix it. Thank you in advance!
Code:
$rpt_content = file_get_contents("{$_POST['rptpath']}\\output\\$ar[0]");
print($rpt_content);
unlink("{$_POST['rptpath']}\\$ar[0]"));
Comment