我有一个test.cfm
动态构建pdf文件并将其输出<cfheader>
到<cfcontent>
浏览器的地方,但我仍然希望页面加载并显示“测试html”:
<CFFILE action="readbinary" file="#expandpath("./test.cfm")#" variable="testcontent" />
<CFHEADER name="Content-Disposition" value="attachment; filename=""test.txt""; charset=utf-8">
<CFCONTENT type="text/plain" reset="yes" variable="#testcontent#">
<CFCONTENT type="text/html" reset="yes" /><!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Testdoc</title>
</head>
<body>test html</body>
</html>
(输出文件本身仅用于示例)
有没有办法做到这一点?