📄 photo.inc
字号:
<%
Function GetPhoto(pEmpSerial)
dim sPhoto : sPhoto = "photo/" & pEmpSerial & ".gif"
'' 映射成物理路经
sPhoto = left(Request.ServerVariables("PATH_TRANSLATED"), instrrev(Request.ServerVariables("PATH_TRANSLATED"),"\")) & "photo\" & pEmpSerial & ".gif"
'' 判断文件是否存在,如果存在,则显示图片,否则显示“照片尚为上传”
dim fso : set fso = createobject("Scripting.FileSystemObject") ' 首先建立fileSystemObject对象
if fso.FileExists(sPhoto) then ' 然后使用FileExists()判断文件是否存在
sPhoto = "photo/" & pEmpSerial & ".gif"
sPhoto = "<img border=0 width=85 height=110 src=""" & sPhoto & """>" ' 文件存在
else
sPhoto = "照片尚未上传" ' 文件不存在
end if
GetPhoto = sPhoto
End Function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -