Visualizzazione dei risultati da 1 a 7 su 7
  1. #1

    Stranissimo problema con Upload file

    Salve ragazzi ho uno script che serve all'utente per poter caricare foto sul server dal proprio pc.Lo script funziona a tutti ma tranne a me VVoVe: VVoVe: VVoVe:

    nel senso mi da errore interno del server.Non riesco proprio a capire che cosa sia...se qualcuno saprebbe dirmi qualcosa a riguardo mi farebbe un enorme piacere...

    Grazie a tutti in anticipo!!!
    http://www.generationweb.it <--- web site

  2. #2
    Non so che script usi ma ti consiglio di cercare l'upload di baol74 sul forum

  3. #3

    Re: Stranissimo problema con Upload file

    Originariamente inviato da generationweb.i
    Salve ragazzi ho uno script che serve all'utente per poter caricare foto sul server dal proprio pc.Lo script funziona a tutti ma tranne a me VVoVe: VVoVe: VVoVe:

    nel senso mi da errore interno del server.Non riesco proprio a capire che cosa sia...se qualcuno saprebbe dirmi qualcosa a riguardo mi farebbe un enorme piacere...

    Grazie a tutti in anticipo!!!
    Lo script per l'upload è in puro asp o no? Quale è questo script? Dacci qualche informazione in più se vuoi che possiamo esserti d'aiuto.

  4. #4
    ecco l'intero codice che serve per fare l'upload e salvare i record nel db

    <%

    percorso = "/public/"

    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,"titoloLM") > 0 then
    testo1 = ContenutoFile
    end if


    if instr(Intestazione,"dataLM") > 0 then
    testo2 = ContenutoFile
    end if

    if instr(Intestazione,"descrizioneLM") > 0 then
    testo3 = ContenutoFile
    end if

    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)
    NomeFile1 = NomeFile
    if imgsmall <> "" then
    imgbig = NomeFile
    else
    imgsmall = NomeFile
    end if
    Set textStream = FSO.CreateTextFile(server.mappath(percorso & NomeFile1), True, False)
    textStream.Write ContenutoFile
    textStream.Close
    Set textStream = Nothing
    Set FSO = Nothing
    end if
    i2 = instr(Intestazione,"filename = ")
    j2 = instr(i2 + 10,Intestazione,chr(34))
    NomeUpload2 = mid(Intestazione,i2 + 10,j2-i2-10)
    i2 = instrRev(NomeUpload2,"\")
    if i2<>0 then
    NomeFile2 = mid(NomeUpload2,i2 + 1)
    else
    NomeFile2 = NomeUpload2
    end if
    if i2<>0 then
    Set FSO = CreateObject("Scripting.FileSystemObject")
    Upload2 = True
    DimensioneFile2 = len(ContenutoFile)
    EstensioneFile2 = right(ContenutoFile,3)
    NomeFile22 = NomeFile2
    imgbig = NomeFile22
    Set textStream = FSO.CreateTextFile(server.mappath(percorso & NomeFile22), True, False)
    textStream.Write ContenutoFile
    textStream.Close
    Set textStream = Nothing
    Set FSO = Nothing
    end if
    next
    End if

    titolo = Replace(testo1,"'","''")
    data = Replace(testo2,"'","''")
    descrizione = Replace(testo3,"'","''")

    ' Mappaggio del database
    Set Conn=Server.CreateObject("ADODB.Connection")
    strConn="driver={Microsoft Access Driver (*.mdb)}; "
    strConn=strConn & " DBQ=" & Server.MapPath("/mdb-database/database.mdb")
    Conn.Open strConn

    sql_inserimento = "INSERT INTO eventi ( data, titolo, descrizione, foto, fotogrande) VALUES ('" & data & "', '" & titolo & "', '" & descrizione & "', '" & imgsmall & "', '" & imgbig & "');"
    Conn.Execute sql_inserimento

    ' Chiusura del database
    conn.Close
    set conn = Nothing
    %>
    http://www.generationweb.it <--- web site

  5. #5

  6. #6
    Salve ragazzi ho trovato l'errore

    Active Server Pages error 'ASP 0113'

    Script timed out

    /prova_sito/commento_ok.asp

    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.


    Come posso risolvere???
    http://www.generationweb.it <--- web site

  7. #7
    Originariamente inviato da generationweb.i
    Salve ragazzi ho trovato l'errore

    Active Server Pages error 'ASP 0113'

    Script timed out

    /prova_sito/commento_ok.asp

    The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.


    Come posso risolvere???
    Prova a leggere questo 3D

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 © 2026 vBulletin Solutions, Inc. All rights reserved.