Pagina 1 di 4 1 2 3 ... ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 36

Discussione: problema assurdo

  1. #1
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680

    problema assurdo

    ciao a tutti, è già la seconda volta che mi capita di scrivere un codice asp più lungo di 280 righe, e puntualmente mi appare questo errore:

    Active Server Pages error 'ASP 0116'
    Missing close of script delimiter
    /falanx3/aggiornamenti/catalogo_modifica2.asp, line 9
    The Script block lacks the close of script tag (%>).


    Sembra quasi che non mi accetti il codice perchè non trova (%>).

    E' una cosa normale?
    Mi sembra assurdo avere limiti di questo tipo nella creazione di un codice asp. Se può essere utli, il linguaggio che sto utilizzando VBscript.

    Fatemi sapere.
    Sto diventando pazzo!

    Grazie.

  2. #2
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680
    Un altra cosa da tenere in considerazione è che in locale mi funziona perfettamente, come lo scarico nello spazio web non va...
    LO STESSO CODICE PRECISO IDENTICO!!!

  3. #3
    è chiaro manca %>
    posta il codice!

  4. #4
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680
    Sono circa 300 righe, provo a postarlo, non spaventarti... come noterai non manca assolutamente %>.
    Comunque il codi è questo:

    codice:
    <%@LANGUAGE="VBSCRIPT"%>
    <html>
    <head>
    <title>Documento senza titolo</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%
    percorso = "/public/fotocatalogo/prodotti/"
    ByteRicevuti = Request.TotalBytes
    if ByteRicevuti > 0 then
    	DatiRicevuti = Request.BinaryRead(ByteRicevuti)
    	For i = 1 To lenB(DatiRicevuti)
    		FileBinario = FileBinario & chr(ascB(midB(DatiRicevuti,i,1)))
    	Next
    	FirmaFile = left(FileBinario,instr(FileBinario,"" & vbCrLf)-1)
    	ArrPezzi = split(FileBinario,FirmaFile)
    	for item = 1 to ubound(ArrPezzi)-1
    		Inizio = instr(ArrPezzi(item),"" & vbCrLf & "" & vbCrLf)
    		Intestazione = left(ArrPezzi(item),Inizio-1)
    		Inizio = Inizio + len("" & vbCrLf) + len("" & vbCrLf)
    	    	ContenutoFile = mid(ArrPezzi(item),Inizio,len(ArrPezzi(item))-Inizio-1)
    		if instr(Intestazione,"campoofferta") > 0 then
    			campoofferta = "S"
    		else
    			campoofferta = "N"					
    		end if		
    		if instr(Intestazione,"campoabilitato") > 0 then
    			campoabilitato = "S"
    		else
    			campoabilitato = "N"					
    		end if
    		if instr(Intestazione,"campocategoria") > 0 then
    			campocategoria = ContenutoFile
    		end if		
    		if instr(Intestazione,"camponome") > 0 then
    			camponome = ContenutoFile
    		end if
    		if instr(Intestazione,"campocodice") > 0 then
    			campocodice = ContenutoFile
    		end if		
    		if instr(Intestazione,"campoprezo") > 0 then
    			campoprezzo = ContenutoFile
    		end if			
    		if instr(Intestazione,"campoprezzoofferta") > 0 then
    			campoprezzoofferta = ContenutoFile
    		end if		
    		if instr(Intestazione,"campodisponibilita") > 0 then
    			campodisponibilita = ContenutoFile
    			campodisponibilita = replace(campodisponibilita,chr(13),"
    ")			
    		end if		
    		if instr(Intestazione,"campodescrizione") > 0 then
    			campodescrizione = ContenutoFile
    			campodescrizione = replace(campodescrizione,chr(13),"
    ")			
    		end if				
    		if instr(Intestazione,"valore_id") > 0 then
    			id = ContenutoFile
    		end if		
    		if instr(Intestazione,"fotominipresente1") > 0 then
    			fotominipresente1 = ContenutoFile
    		end if		
    		if instr(Intestazione,"fotominipresente2") > 0 then
    			fotominipresente2 = ContenutoFile
    		end if		
    		if instr(Intestazione,"fotominipresente3") > 0 then
    			fotominipresente3 = ContenutoFile
    		end if						
    		if instr(Intestazione,"fotomediapresente") > 0 then
    			fotomediapresente = ContenutoFile
    		end if				
    		if instr(Intestazione,"fotograndepresente1") > 0 then
    			fotograndepresente1 = ContenutoFile
    		end if		
    		if instr(Intestazione,"fotograndepresente2") > 0 then
    			fotograndepresente2 = ContenutoFile
    		end if		
    		if instr(Intestazione,"fotograndepresente3") > 0 then
    			fotograndepresente3 = ContenutoFile
    		end if																								
    		if instr(Intestazione,"fotomini1") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotomini1 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotomini1), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if		   
    		end if		
    		if instr(Intestazione,"fotomini2") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotomini2 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotomini2), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if		   
    		end if		
    		if instr(Intestazione,"fotomini3") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotomini3 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotomini3), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if		   
    		end if				
    		if instr(Intestazione,"fotomedia") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotomedia = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotomedia), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if		   
    		end if								
    		if instr(Intestazione,"fotogrande1") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotogrande1 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotogrande1), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if
    		end if	
    		if instr(Intestazione,"fotogrande2") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotogrande2 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotogrande2), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if
    		end if			
    		if instr(Intestazione,"fotogrande3") > 0 then
    		    i = instr(Intestazione,"filename=")
    			j = instr(i + 10,Intestazione,chr(34))
    			NomeUpload = mid(Intestazione,i + 10,j-i-10)
    			i = instrRev(NomeUpload,"\")
    			if i<>0 then
        		    NomeFile = mid(NomeUpload,i + 1)
        		else
        			NomeFile = NomeUpload
        		end if
          		if i<>0 then
    				Set FSO = CreateObject("Scripting.FileSystemObject")
    				Upload1 = True
    				DimensioneFile1 = len(ContenutoFile)
    				EstensioneFile1 = right(ContenutoFile,3)
    				fotogrande3 = replace(NomeFile," ","")
        			Set textStream = FSO.CreateTextFile(server.mappath(percorso & fotogrande3), True, False)
        			textStream.Write ContenutoFile
        			textStream.Close
        			Set textStream = Nothing
    	   			Set FSO = Nothing
        	   end if
    		end if						
    	next	
    if fotomini1 = "" then
    	fotomini1 = fotominipresente1
    end if
    if fotomini2 = "" then
    	fotomini2 = fotominipresente2
    end if
    if fotomini3 = "" then
    	fotomini3 = fotominipresente3
    end if
    if fotomedia = "" then
    	fotomedia = fotomediapresente
    end if
    if fotogrande1 = "" then
    	fotogrande1 = fotograndepresente1
    end if
    if fotogrande2 = "" then
    	fotogrande2 = fotograndepresente2
    end if
    if fotogrande3 = "" then
    	fotogrande3 = fotograndepresente3
    end if
    dim co 
    set co = server.createObject("ADODB.Connection") 
    co.Open "Driver={MySQL ODBC 3.51 Driver};server=62.149.112.23;port=3306;Database=Sql35582_1;UID=Sql35582;PWD=(8LMkRD-;" 
    strq = "UPDATE catalogo SET categoria ='"& campocategoria & "', nome ='" & camponome & "', codice='" & campocodice &"', prezzo='" & campoprezzo & "', prezzoofferta='" & campoprezzoofferta & "', offerta='" & campoofferta & "', abilitato='" & campoabilitato & "', disponibilita='" & campodisponibilita & "', descrizione='" & campodescrizione & "', fotomini1='" & fotomini1 & "', fotomini2='" & fotomini2 & "', fotomini3='" & fotomini3 & "', fotomedia='" & fotomedia & "', fotogrande1='" & fotogrande1 & "', fotogrande2='" & fotogrande2 & "', fotogrande3='" & fotogrande3 & "'WHERE id=" & id
    co.execute (strq) 
    Response.redirect ("catalogo.asp") 
    End if
    %>
    
    </body>
    </html>

  5. #5
    usi include?!

  6. #6
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680
    Non ti ho capito, comunque se era una domanda ti rispondo "NO".
    Cosa mi consigli di fare?
    Cosa hai trovato di strano?

  7. #7
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680

  8. #8
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680
    Qualcuno sa dare una spiegazione al mio strano problema???
    Fatemi sapere.
    Grazie mille.

  9. #9
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Verica che il numero del IF sia uguale a quello degli END IF.

    Roby

  10. #10
    Utente di HTML.it
    Registrato dal
    Mar 2004
    Messaggi
    680
    Verificato... è uguale (9 e 9)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.