Outputing a text file for user to see
我已经能够以这种方式使用标签向用户显示 pdf 文件:
1
2 |
<object data=”/Reports/PDF/#Trim(RptName)#_NewReport.pdf” type=”application/pdf” width=”860″ height=”700″>
</object> |
是否也可以对 pdf 文件以外的任何文件执行此操作?我还需要向我的用户显示他们的日志文件 UserName_Error.log。我尝试了以下,没有任何显示,日志在那里。我用谷歌搜索了提示,但找不到。
1
2 |
<object data=”/Reports/UserError/#Trim(UserName)#_Error.log” type=”text/html” width=”860″ height=”700″>
</object> |
如果这根本不可能?
- 这可能是一个很好的起点-> stackoverflow.com/questions/6450921/
- 您可以使用 <cffile> 或 <cfhttp> 读取文本文件。详细信息在互联网上提供的手册中。
使用 iframe.
The HTML <iframe> element represents a nested browsing context, effectively embedding another HTML page into the current page.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
- iframe、嵌入和对象元素之间的区别:stackoverflow.com/questions/16660559/
来源:https://www.codenong.com/47836368/