Visualizzazione dei risultati da 1 a 10 su 10

Discussione: come va scritto ???

  1. #1

    come va scritto ???

    Salve
    sto provando ad usare questo script per fare il download di un file
    ma non capisco questa riga????

    %>
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <META HTTP-EQUIV="refresh" CONTENT="1; URL=hideawayfolder/<% Response.Write Request.QueryString("File") %>">
    </HEAD>
    <BODY>
    <center>
    Your download will start in 1 second.

    </center>
    <%
    'change to 3000 or higher if the user don't get the download box.
    for i=1 to 2000
    next
    response.redirect "empty.asp"
    'need to do this so the user can't view this code
    %>

    ' Change hideawayfolder to the name of the folder where your files is
    ' e.g. if u put these files in www.d.com/test
    ' and your files are in www.d.com/test/filez
    ' then change the below to .... URL=filez/>% ......

    il file che vorrei far scaricare è istruzioni.txt e lo metterei nella cartella manuali
    grazie a chi mi aiuta...!

  2. #2
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    codice:
    <META HTTP-EQUIV="refresh" CONTENT="1; URL=/manuali/<% Response.Write Request.QueryString("File") %>">
    Il nome del file lo devi passare in querystring...

    Roby

  3. #3

    tipo cosi giusto!!!

    <%@ Language=VBScript %>
    <%
    Option Explicit
    response.buffer=true
    If IsEmpty(Request.QueryString("File")) Then
    Response.Redirect ""
    End If

    %>

  4. #4

    questa è la pagina del download

    <html>

    <head>
    <title>download</title>
    <script language="JavaScript">
    <!-- hide from JavaScript-challenged browsers

    function openWindow(file) {
    popupWin = window.open('dl.asp?File='+file, 'new_page', 'width=4,height=4')
    }
    // done hiding -->
    </script>
    </head>

    <body bgcolor="#000000" text="#00ff00">
    // change Yourfilenamehere.zip with the name of the file you want the user to be able to download
    // don't include any folder info if the file is in another folder, you do that in the dl.asp file!

    istruzioni.txt</body>
    </body>
    </html>

  5. #5
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Quindi? Funziona? Ti da errore? Quale?

    Roby

  6. #6

    e questa e il file asp

    <%@ Language=VBScript %>
    <%
    Option Explicit
    response.buffer=true
    If IsEmpty(Request.QueryString("File")) Then
    Response.Redirect ""
    End If

    %>
    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <META HTTP-EQUIV="refresh" CONTENT="1; URL=/manuali/<% Response.Write Request.QueryString("File") %>">
    </HEAD>
    <BODY>
    <center>
    Your download will start in 1 second.

    </center>
    <%
    'change to 3000 or higher if the user don't get the download box.
    for i=1 to 2000
    next
    response.redirect "empty.asp"
    'need to do this so the user can't view this code
    %>
    </BODY>
    </HTML>

    però non mi parte il download , anzi se clicco sul file mi apre la pagina asp e mi fa vedere quello che cè scritto..cioè il suo codice

  7. #7
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Se clicchi su quale file? Il file ASP o il file TXT?

    Roby

  8. #8

    sul file txt

    sul file txt nella pagina del download

  9. #9
    Moderatore di ASP e MS Server L'avatar di Roby_72
    Registrato dal
    Aug 2001
    Messaggi
    19,559
    Sei di poche parole e non si capisce cosa dici.
    Se clicchi su un link contenente un file di testo il browser lo visualizzerà all'interno della pagina a meno che tu non lo forzi a farne comunque il download.
    Ma lo script che usi non è adatto.
    Cerca nel forum per "download forzato".

    Roby

  10. #10

    ha ecco

    ha ecco perchè sbaglio , perche è un file txt
    se invece forse uno zip non aprirebbe la pagina giusto
    ma partirebbe il download
    quello che cerco io è che il download parta in automatico e che non si possa più scarica

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.