开发者

coldfusion <cfcontent image issue

I am creating the xls using below code:

SelectImageDetail is the query which fetches the image details from DB.
<cfset LogoName=url.paths.system&"SelectImageDetail.ImgName&"."&SelectImageDetail.FileExt/>
<cfcontent type="application/excel">
<cfheader name="Content-Disposition" value="inline/attachment; filename=RRInvoice.xls">
<cfoutput>
<table width="619" height="1980" >
<tr>
<cfif trim(LogoName) NEQ "" AND FileExists(#LogoName#)>
<td align="right" colspan="2"><IMG SRC="#LogoName#" ALT="" WIDTH=115 HEIGHT=90 BORDER=0>
</tr>
</table>

I can get the displayed in the xls in development server but when i access the sa开发者_开发知识库me by remote (Production), it's not displayed.

Note: I am uploading the image by creating the directory in the server root base .


Maybe I'm completely misunderstanding what you are trying to do here. Does the html automatically get interpreted by excel?

One thing that appears to not be correct is inline/attachment. I believe you only want to use "inline" or "attachement", not both. They are two different approaches to serving the file up to the browser.

If changing to only have one of those options doesn't work, rule out excel by removing cfcontent/cfheader and just see if the html outputs correctly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜