Visualizzazione dei risultati da 1 a 5 su 5
  1. #1
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    909

    script Uploader Download

    salve gente ho un problema con questo script scaricato dal portale html.

    non riesco a fare l'upload, nonostante abbia assegnato i permessi di scrittura alla cartella di destinazione...

    credo che il problema sia nel path ovvero nel percorso che inserisco per arrivare alla cartella di destinazione.

    $dl = "http://www.miosito.it/demo"; //url where files are uploaded
    $absolute_path = "/demo"; //Absolute path to where files are uploaded

    se non è così cortesemente ditemi quale percorso devo inserire (il + easy possibile)

    Thanks!!!!

  2. #2
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    909

    up

    up please!

  3. #3
    Se posti tutto il codice, magari..
    Main: Asus P5KR | Intel Q6600 G0 @ 3.6GHz | Kingston 2x1GB DDR-II @ 800MHz | POV GeForce 8800GT 512MB | Seagate Barracuda 7200.11 32MB 2x500GB RAID0 | Enermax Chakra 3052BS | Enermax Liberty 500W | Zerotherm Nirvana NV120 Premium || eee PC || Net: Atlantis Land WebShare 340 | Alice 19M/1M || Gentoo Linux | gtk-gnutella rulezz.

  4. #4
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    909
    codice:
    <?
    $sizelimit = "no"; //Do you want a size limit, yes or no?
    $sizebytes = "200000"; //size limit in bytes
    $dl = "http://www.miosito.it/demo"; //url where files are uploaded
    $absolute_path = "/demo"; //Absolute path to where files are uploaded
    $websiteurl = "http://www.miosito.it"; //Url to you website
    $websitename = "mio sito";
    
    switch($action) {
    default:
    echo"
    <html>
    <head>
    <title>Upload Or Download</title>
    </head>
    <body>
    <a href=$PHP_SELF?action=upload>Upload File</a>
     <a href=$PHP_SELF?action=download>Download File</a>
     <a href=$websiteurl>Return to $websitename</a>
    
    
    
    Powered by <a href=http://www.zachwhite.com/>PHP Uploader Downloader</a>
    </body>
    </html>";
    break;
    case "download":
    echo "
    <html>
    <head>
    <title>File Download</title>
    </head>
    <body> <a href=$websiteurl>Return to $websitename";
    $list = "<table width=700 border=1 bordercolor=#000000 style=\"border-collapse: collapse\">";
    $list .= "<tr><td width=700><center>Click To Download</center></td></tr>";
    $dir = opendir($absolute_path);
    while($file = readdir($dir)) {
    if (($file != "..") and ($file != ".")) {
    $list .= "<tr><td width=700><center><a href=$dl/$file>$file</a></center></td></tr>";
    }
    }
    $list .= "</table>";
    echo $list;
    echo"
    
    
    
    Powered by <a href=http://www.zachwhite.com/>PHP Uploader Downloader</a>
    </body>
    </html>";
    break;
    
    case "upload":
    echo"
    <html>
    
    <head>
    <title>File Upload</title>
    </head>
    
    <body>
    
    <form method=POST action=$PHP_SELF?action=doupload enctype=multipart/form-data>
    
    
    File to upload:
    
    <input type=file name=file size=30>
    
    
    <button name=submit type=submit>
    Upload
    </button>
    </form>
    
    
    
    Powered by <a href=http://www.zachwhite.com/>PHP Uploader Downloader</a>
    </body>
    
    </html>";
    break;
    
    
    //File Upload
    case "doupload":
    $dir = "dir";
    if ($file != "") {
    
    if (file_exists("$absolute_path/$file_name")) {
    die("File already exists");
    }
    
    if (($sizelimit == "yes") && ($file_size > $sizebytes)) {
    die("File is to big. It must be $sizebytes bytes or less.");
    }
    
    
    @copy($file, "$absolute_path/$file_name") or die("The file you are trying to upload couldn't be copied to the server");
    
    } else {
    die("Must select file to upload");
    }
    echo "
    <html>
    <head>
    <title>File Uploaded</title>
    </head>
    <body>";
    echo $file_name." was uploaded";
    echo "
    
    <a href=$PHP_SELF?action=upload>Upload Another File</a>
    <a href=$PHP_SELF?action=download> Download File</a>
    <a href=$websiteurl> Return to $websitename</a>
    
    
    Powered by <a href=http://www.zachwhite.com/>PHP Uploader Downloader</a>
    </body>
    </html>";
    break;
    
    }
    ?>

  5. #5
    Utente di HTML.it
    Registrato dal
    Jul 2005
    Messaggi
    909

    up

    up

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.