|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp,jsp,php是web开发的三大技术,asp简单易用且有microsoft做靠山,jsp功能强大是因为有java支持,php则开源跨平台.在国内,asp应用范围最广,jsp发展势头最猛,php则处于劣势.这可能与公司的支持以及技术的培训有关.ado|vbscript Function Bytes2bStr(vin)
if lenb(vin) =0 then
Bytes2bStr = ""
exit function
end if
''二进制转换为字符串
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
BytesStream.Type = 2
BytesStream.Open
BytesStream.WriteText vin
BytesStream.Position = 0
BytesStream.Charset = "gb2312"
BytesStream.Position = 2
StringReturn = BytesStream.ReadText
BytesStream.close
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function
Function BinVal(bin)
Dim i
Dim ret:ret = 0
for i = lenb(bin) to 1 step -1
ret = ret *256 + ascb(midb(bin,i,1))
next
BinVal = ret
End Function
Function BinVal2(bin)
Dim i
Dim ret:ret = 0
for i = 1 to lenb(bin)
ret = ret *256 + ascb(midb(bin,i,1))
next
BinVal2 = ret
End Function
Function getImageWH(fdata)
'一个实参fdata,二进制图像数据(至于怎样读取图像的二进制数据就不必说了吧-_-!)
'前往值为一个数组,3个元素,分离为图片格局.长.宽
dim ret(2),bFlag,fsize,ADOS
fsize=clng(lenb(fdata)) '获得数据尺寸
if fsize=0 then Exit Function
Set ADOS = Server.CreateObject("ADODB.Stream")
ADOS.Type = 1
ADOS.Mode = 3
ADOS.Open
ADOS.Write fdata
ADOS.Position = 0
'写文本对象读取图象长宽和类型
ADOS.Position = 0 '重置数据入手下手地位
bFlag = ADOS.read(3)
if isNull(bFlag) then
ret(0) = "unknow"
ret(1) = 0
ret(2) = 0
getimagewh = ret
Exit Function
end if
'取文件类型和长宽
select case hex(binVal(bFlag))
case "4E5089":
ADOS.read(15)
ret(0) = "png"
ret(1) = BinVal2(ADOS.read(2))
ADOS.read(2)
ret(2) = BinVal2(ADOS.read(2))
case "464947":
ADOS.read(3)
ret(0) = "gif"
ret(1) = BinVal(ADOS.read(2))
ret(2) = BinVal(ADOS.read(2))
case "FFD8FF":
dim p1
do
do: p1 = binVal(ADOS.Read(1)): loop while p1 = 255 and not ADOS.EOS
if p1 > 191 and p1 < 196 then exit do else ADOS.read(binval2(ADOS.Read(2))-2)
do:p1 = binVal(ADOS.Read(1)):loop while p1 < 255 and not ADOS.EOS
loop while true
ADOS.Read(3)
ret(0) = "jpg"
ret(2) = binval2(ADOS.Read(2))
ret(1) = binval2(ADOS.Read(2))
case else:
if left(Bytes2bStr(bFlag),2) = "BM" then
ADOS.Read(15)
ret(0) = "bmp"
ret(1) = binval(ADOS.Read(4))
ret(2) = binval(ADOS.Read(4))
else
ret(0) = ""
end if
ADOS.Close
Set ADOS = Nothing
end select
Select case ret(0)
case "png","jpg","bmp","gif"
ret(1) = ret(1)
ret(2) = ret(2)
ret(0) = ret(0)
case else
ret(1) = 0
ret(2) = 0
ret(0) = "unknow"
end select
getimageWH = ret
End Function
Function GetWebData(StrUrl)
'获得INTERNET上的图片二进制数据
On Error Resume Next
if StrUrl="" then
GetWebData = ""
exit function
end if
dim tempStr
tempStr=split(StrUrl,"/")
if tempStr(ubound(tempStr))="" or inStr(StrUrl,"/")=0 then
GetWebData = ""
exit function
end if
dim Retrieval
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", StrUrl, False, "", ""
.Send
GetWebData =.ResponseBody
End With
Set Retrieval = Nothing
If Err.Number <> 0 Then Err.Clear
End Function
当然了,现在国内CRM厂商的产品与其说是CRM,但从至少从我的角度分析上来看,充其量只是一个大型的进销存而已了,了解尚浅,不够胆详评,这里只提技术问题 |
|