关于html:输出一个文本文件供用户查看 | 珊瑚贝

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/

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_9441.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?