修改后还是显示不出来图片。
图片存放在指定目录。拼接的文件目录是正确的,程序判断文件是存在的。可就是不显示。请老师看看源码哪里的问题?谢谢
Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
Dim s As Row
Dim zc As String="1=2"
If e.GetValues.ContainsKey("key") Then zc="[_Identify]=" & e.GetValues("key")
Dim r As DataRow=DataTables("产品").sqlfind(zc)
wb.AddForm("","form1","test.htm")
Dim sy As String=Nothing
If r IsNot Nothing Then sy= r("产品编码") & " " & r("产品类别") & " " & r("产品种类")
With wb.AddInputGroup("form1","ipg1",sy)
If r IsNot Nothing Then
With .AddInput("产品名称","产品名称","text")
.value = r("产品名称")
.Readonly=True
End With
With .AddInput("产品材料","产品材料","text")
.value = r("产品材料")
.Readonly=True
End With
With .AddInput("单位规格","单位规格","text")
.value = r("单位") & "/" & r("规格")
.Readonly=True
End With
Dim wjx As String="C:\dataFile\jxmz\ftpml"
Dim h() As String
Dim wjml As String
wjml=r("照片")
wjml=wjml.Replace(chr(13),"")
h=wjml.split(chr(10))
If h.Length>0 Then
Dim lszc As String
With .AddUploader("up1","图片",True)
.AllowAdd = False '关闭文件上传功能
For Each x As String In h
lszc=wjx & x
lszc=lszc.Replace("/","\")
If FileSys.FileExists(lszc) Then
s=Tables("临时表").AddNew
s("第一列")=lszc
s("第二列")="查到文件"
' PopMessage("AA文件存在 " & lszc,"提示", PopIconEnum.Infomation,2)
.AddImage(UrlEncode(lszc))
Else
' PopMessage("文件没找到 " & lszc,"提示", PopIconEnum.Infomation,2)
s=Tables("临时表").AddNew
s("第一列")=lszc
s("第二列")="没查到文件"
End If
Next
End With
End If
End If
End With
With wb.AddButtonGroup("","btg3", False)
.Add("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build) '生成网页
Return True