图片显示问题
我在图片显示的时候碰到问题,本地测试没问题,传到网上说
服务器对象 错误 'ASP 0177 : 800401f3'
Server.CreateObject 失败
/huiyuan/xinwenshow.asp,行68
无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
显示页主要的代码如下
<%
dim conn,connStr,db
db="data/data#.mdb"
connStr="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath(db)
set conn=server.CreateObject("adodb.connection")
conn.open connStr
%>
<%
function HTMLEncode(fString)
fString = replace(fString, ">", ">")
fString = replace(fString, "<", "<")
fString = Replace(fString, CHR(32), " ")
fString = Replace(fString, CHR(9), " ")
fString = Replace(fString, CHR(34), """)
fString = Replace(fString, CHR(39), "'")
fString = Replace(fString, CHR(13), "")
fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
fString = Replace(fString, CHR(10), "<BR> ")
HTMLEncode = fString
end function
function showtitle(title,shownum)
if isnull(title) then
showtitile=""
end if
l=len(title)
if l > shownum then
title=left(title,shownum-1)&"…"
end if
showtitle=title
end function
id=replace(request("id"),"'","")
if id="" or isnumeric(id)=false then
response.Write("对不起,您企图进行不正当的操作,请注意您的行为!")
response.end()
end if
sql="select * from xinwen where id="&id
set rs=conn.execute(sql)
if rs.eof then
response.write"对不起,您企图进行不正当操作,请注意您的行为!"
response.end()
end if
%>
<%
imgname=rs("imgname")
set fso=server.CreateObject("scripting.filesystemobject")
path=server.MapPath("../admin/newimg")&"/"&rs("imgname")
if fso.fileExIsTs(path) then
%> <img src="../admin/newimg/<%=rs("imgname")%>" alt="" width="208" height="264" align="left">
<%end if%>
这些代码在本地测试没事,上网就出事了,是网上租的服务器不支持自定义的FSO吗,那有没有什么办法可以代替用来显示图片呢?小弟已经弄了三天了,就是想不明白,高手指点下!