'------------------------------------------- '函数名:chkimg '作 用:检查图片文件是否合法 '参 数:img,图片路径 '返回值:布尔类型 '条 件:服务器必须支持AspJpeg '------------------------------------------- Function chkimg(img) on error resume Next chkimg=True if isnull(img) then chkimg=false:exit function Set chkJpeg = Server.CreateObject("Persits.Jpeg") chkPath = Server.mappath(img) chkJpeg.Open chkPath If Err Then chkimg=False End If If err.number>0 Then err.clear Set chkjpeg=Nothing End Function