关于ASP文件上传的文档和EXCEL表格无法打开的问题!
小弟学习ASP技术不多,现在在维护一个网站。最近网站出现了关于ASP文件上传的文档和EXCEL表格无法打开的问题。希望哪位大虾能帮帮小弟,在此谢过了!
原先可以打开文档,现在一点就出现下载的选项,选择打开也是打开一个ASP的文件,文件名为:showing.asp。
文件中的具体内容为:
<!-- #include file="adodb.inc" -->
<%
'request("id")=1
'set connGraph=server.CreateObject("ADODB.connection")
'connGraph.Open "dsn=img"
'set rec=server.createobject("ADODB.recordset")
mysql="select img,opentype from adjunct where id=" & trim(request("id"))
rst.open mysql,cnn,1,1
if rst("opentype")="text/plain " then
Response.ContentType ="application/msword "
else
Response.ContentType =rst("opentype")
end if
'response.write(rst("opentype"))
Response.BinaryWrite rst("img").getChunk(7500000)
rst.close
set rst=nothing
set cnn=nothing
%>