关于adodb.stream的问题

来源:百度知道 编辑:UC知道 时间:2024/05/15 06:48:11
<!--#include file="cls.asp" -->
<%
rname=request.querystring("name")
rage=request.querystring("age")
rmap=request.querystring("map")

Dim objbmp
Set objbmp = New clsBMPText
objbmp.FontPath = server.mappath("font_12.asp")
objbmp.loadBMP(server.mappath(rmap))
objbmp.DrawTextWE 80,80,rname,15
objbmp.DrawTextWE 80,120,rage,15
objbmp.write()
set objbmp=nothing
%>
当rmap不存在时 cls.asp
obj.LoadFromFile filename 这行出问题

请问

如何写:当filename不存在时.不做处理,谢谢了

htc10的描述是可行的。

但是如果服务器不支持FSO组件也就等于没用。

建议在 sub loadBMP(filename)下添加
on error resume next

然后添加 if err=0 then sBMP=***.read()

在 loadTxt(lx,ly,t,color) 和 sub write 下都添加一个
if lenb(sBmp)<54 then exit sub

obj.LoadFromFile filename 这行出问题
这行没有啊
Set fso = Server.CreateObject("Scripting.FileSystemObject")
if not fso.Folderexists(filename ) then response.end()
Set fso = nothing