HttpRequest事件代码:
'头文件
Dim fl As String = "c:\web\" & e.path
If filesys.FileExists(fl)
Dim idx As Integer = fl.LastIndexOf(".")
Dim ext As String = fl.SubString(idx)
Select Case ext
Case ".jpg",".gif",".png",".bmp",".wmf",".js",".css" ,".html",".htm",".zip",".rar"
e.WriteFile(fl)
Return '这里必须返回
End Select
End If
'代码生成条码图片
Dim Bar As New BarCodeBuilder
Bar.Symbology = Barpro.Symbology.Code39
Bar.Code = "123456"
Bar.BarRatio = 3
Bar.BarHeight = 8
Bar.QuietZoneWidth = 5
Bar.DisplayCode = False
Bar.CodeAlignment = Barpro.Alignment.BelowRight
Bar.TextAlignment = Barpro.Alignment.AboveLeft
Bar.SaveImage("./images/条码.jpg")
'网页浏览图片
Select Case e.Path
Case "test.htm"
Dim wb As New weui
wb.AddForm("","form1","test.htm")
With wb.AddInputGroup("form1","ipg1","条码测试")
With .AddUploader("up1","",True)
.AllowAdd = False '关闭文件上传功能
.AddImage("./images/条码.jpg")
End With
End With
e.WriteString(wb.Build) '生成网页
End Select
问题:两种颜色代码相同,但对应路径却不一样
1、绿色: C:\Windows\SysWOW64\images
2、兰色:c:\web\images
绿色部分如何使用相对路径?