Questo codice dovrebbe poter inviare tre diversi file contemporaneamente.
Però non funziona e non capisco perchè. Parte solo il primo file.codice:if instr(Intestazione,"file1") > 0 then i = instr(Intestazione,"filename=") j = instr(i + 10,Intestazione,chr(34)) NomeUpload1 = mid(Intestazione,i + 10,j-i-10) i = instrRev(NomeUpload1,"\") if i<>0 then NomeFile1 = mid(NomeUpload1,i + 1) else NomeFile1 = NomeUpload1 end if if i<>0 then Set FSO = CreateObject("Scripting.FileSystemObject") Upload1 = True DimensioneFile1 = len(ContenutoFile) EstensioneFile1 = right(ContenutoFile,3) NomeFile1 = NomeFile1 Set textStream = FSO.CreateTextFile(server.mappath(percorso & NomeFile1), True, False) textStream.Write ContenutoFile textStream.Close Set textStream = Nothing Set FSO = Nothing end if end if if instr(Intestazione,"file2") > 0 then i = instr(Intestazione,"filename = ") j = instr(i + 10,Intestazione,chr(34)) NomeUpload2 = mid(Intestazione,i + 10,j-i-10) i = instrRev(NomeUpload2,"\") if i<>0 then NomeFile2 = mid(NomeUpload2,i + 1) else NomeFile2 = NomeUpload2 end if if i<>0 then Set FSO = CreateObject("Scripting.FileSystemObject") Upload2 = True DimensioneFile2 = len(ContenutoFile) EstensioneFile2 = right(ContenutoFile,3) NomeFile2 = NomeFile2 Set textStream = FSO.CreateTextFile(server.mappath(percorso & NomeFile2), True, False) textStream.Write ContenutoFile textStream.Close Set textStream = Nothing Set FSO = Nothing end if end if if instr(Intestazione,"file3") > 0 then i = instr(Intestazione,"filename = ") j = instr(i + 10,Intestazione,chr(34)) NomeUpload3 = mid(Intestazione,i + 10,j-i-10) i = instrRev(NomeUpload3,"\") if i<>0 then NomeFile3 = mid(NomeUpload3,i + 1) else NomeFile3 = NomeUpload3 end if if i<>0 then Set FSO = CreateObject("Scripting.FileSystemObject") Upload3 = True DimensioneFile3 = len(ContenutoFile) EstensioneFile3 = right(ContenutoFile,3) NomeFile3 = NomeFile3 Set textStream = FSO.CreateTextFile(server.mappath(percorso & NomeFile3), True, False) textStream.Write ContenutoFile textStream.Close Set textStream = Nothing Set FSO = Nothing end if end if
![]()


Rispondi quotando