|
|
|
ช่วยดูให้ทีครับ Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument: 'Asc' |
|
|
|
|
|
|
|
มีโค๊ดให้ดูปะ
|
|
|
|
|
Date :
1 มิ.ย. 2548 22:13:53 |
By :
nugul |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<%
'---
Function TextToBinary(text)
For i = 1 to Len(text)
character = Mid(text,i,l)
TextToBinary=TextToBinary & ChrB(Asc(character))
Next
End Function
'------------------
Function BinaryToText(Binary)
BinaryToText=""
For i=1 to LenB(Binary)
character=MidB(binary,i,l)
BinaryToText=BinaryToText & Chr(AscB(character))
Next
End Function
'-----------------------------------------------
Set uploaddata=CreateObject("Scripting.Dictionary")
'-----------------------------------------------------------------------------------------
data=Request.BinaryRead(Request.TotalBytes)
posend=InstrB(l,data,TextToBinary(chr(13)))
header=MidB(data,l,posend-1)
'---------------------------------------------------------------------------------------------
endheader=header&TextToBinary("--")
pos_header=1
pos_endheader=InStrB(l,data,endheader)
'-----------------------------------------------------------------------------------------
Do While pos_header<>pos_endheader
'-------------------------------------------------------------------------------------------
Set sub_uploaddata=CreateObject("Scripting.Dictionary")
'---------------------------------------------------------------------------------------------µÑ´ª×èͧ͢ªèͧ¡ÃÍ¡¢éÍÁÙÅ
pos_name=InStrB(pos_header,data,TextToBinary("name="))
pos_namebegin=pos_name+6
pos_nameend=InStrB(pos_namebegin,data,TextToBinary(Chr(34)))
name=BinaryToText(MidB(data,pos_namebegin,pos_nameend-pos_namebegin))
'-----------------------------------------------àªç¤ÇèÒÁÕ¢éÍÁÙÅËÃ×Íà»ÅèÒ
pos_file=InStrB(pos_nameend,data,TextToBinary("filename="))
enddata=InStrB(pos_nameeend,data,header)
if (pos_file<>0) And (pos_file < enddata)Then
'--------------------¶éÒãªé
pos_filebegin=pos-file + 10
pos_fileend=InStrB(pos_filebegin,data,TextToBinary(Chr(34)))
filename=BinaryToText(MidB(data,pos_filebegin,pos_fileend-pos_filebegin))
'-------------------------------------------------------------------------------------
sub_uploaddate.Add "filename",filename
'------------------------------------------------------------------------------------
pos_content=InStrB(pos_fileend,data,TextToBinary("Content-Type:"))
pos_contentbegin=pos_content + 14
pos_contentend=InStrB(pos_contentbegin,data,TextToBinary(Chr(13)))
contenttype=BinaryToText(MidB(data,pos_contentbegin,pos_contentend-pos_contentbegin))
'----------------------------------------------------------------------------------------------------------------------------
Sub_uploaddate.Add "contenttype",contenttype
'---------------------------------------------------------------------------------------------------
pos_valuebegin=pos_contentend + 4
pos_valueend=InStrB(pos_valuebegin,data,header)-2
Value=BinaryToText(MidB(data,pos_valuebegin,pos_valueend-pos_valuebegin))
'-----------------------------------------------------------------------------------------------------------------------------------
sub_uploaddata.Add "value",value
'------------------------------------------------------------------------------------------------------------------------------------------äÁèãªè
Else
pos_valuebegin=pos_nameend + 4
pos_valueend=InStrB(pos_valuebegin,data,header)-2
Value=BinaryToText(MidB(data,pos_valuebegin,pos_valueend-pos_valuebegin))
'-----------------------------------------------------------------------------------------------------------------------------------------
sub_uploaddata.Add "value",value
End if
'---------------------------------------------------------------------
uploaddata.Add name,sub_uploaddata
'-----------------------------------------------------------------------
pos_header=InStrB(pos_header+LenB(header),data,header)
Loop
%>
|
|
|
|
|
Date :
2 มิ.ย. 2548 08:29:02 |
By :
กรรมกรบริษัท |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
character = Mid(text,i,l)===>ผิดครับ
มันต้อ้ง เป็นเลข 1 ที่ถูกคือ
character = Mid(text,i,1)
|
|
|
|
|
Date :
2 มิ.ย. 2548 18:51:09 |
By :
nugul |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
สวัสดีครับ
คุณ nugul นี่สุดยอดเลยนะครับ ผมมองดูยังตาลาย เลย
แซวเล่นนะครับ
555
|
|
|
|
|
Date :
4 มิ.ย. 2548 10:55:38 |
By :
K.Wiwat |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|