Visualizzazione dei risultati da 1 a 5 su 5

Discussione: [php] upload immagine

  1. #1

    [php] upload immagine

    Ciao ragazzi!!!
    ho installato questo script:
    http://php.html.it/script/vedi/1831/uploadfile-20/
    Ho inserito la directory "uploads"
    Ho immesso la password "password"
    il sito non finziona.
    Il problema e' che non mi da alcun errore.

    Se non sono stato chiaro chiedetemi pure cerchero' di spigarmi ulteriormente...
    Grazie 1000

  2. #2
    ho notato che all'interno dello script ci sono ancora variabili dichiarate in questo modo;


    $n=$HTTP_POST_FILES["file$k"]['name'];

    le sostituisco

    $n=$FILES["file$k"]['name'];

  3. #3
    Non ne do fuori!!!!

    per favore aiutatemi....

    vi posto il codice
    Codice PHP:
    include "settings.php"; /*Inclusion of the config file*/

    if ($a<>'1')

        ?>
        <FORM METHOD="Post" ENCTYPE="multipart/form-data" ACTION="index.php">
        <input type=hidden name=a value=1>
        <?
        $k
    =1;
        while (
    $k<=$up)
        {
            
    ?>
            
            File <?=$k?>: <INPUT TYPE="file" NAME="file<?=$k?>">


            
            <?
            $k
    ++;
        }
        
    ?>
        <INPUT TYPE="submit" value=UPLOAD></FORM>
        <?

    else 
    {
        
    $k=1;
        while (
    $k<=$up)
        {
            echo 
    "$c File $k";
            
    $t=$_FILES["file$k"]['tmp_name'];
            
    $sz=$_FILES["file$k"]['size'];
            
    $n=$_FILES["file$k"]['name'];
            if (
    $t=='none')
            {
                echo 
    ": $err1";
            } 
            elseif (
    $sz>$s)
            {
                echo 
    ": $err";
            } 
            else 
            {
                echo 
    " ($n): ";
                
    copy($t,"$d$n"); /* Copying the file */
                
    echo $ok;
            }
            echo 
    "
    "
    ;
            
    $k++;
        }
        echo 
    "

    <a href=\"index.php\">
    $back</a>";
    }

  4. #4
    e questo è l'altro

    Codice PHP:
    // CONFIG FILE
    // EDIT THIS FILE TO CUSTOMIZE YOUR SCRIPTS
    //
    // WRITTEN BY MATTEO FIGUS 2002
    // [email]mattfigs@supereva.it[/email]
    // [url]http://www.matteofigus.cjb.net[/url]

    // Password

    $psw="a";


    // Name of the directory where the files will be saved (with slash "/")
    // Nome della directory in cui verranno salvati i files (con lo slash "/")

    $d="uploads/";


    // Maximum filesize (bytes - 15000 = 15KB)
    // Dimensione massima del file in bytes (15000= 15KB)    

    $s=15000;


    // Uploading.. Message
    // Messaggio Trasferimento del file...

    $c="Creating";


    // Error Message (Filesize over limit)
    // Messaggio di errore (Dimensione del file al di sopra del limite imposto)

    $err="ERROR - Filesize over limit";


    // Error Message (Not Found, or File-Browse-Box empty)
    // Messaggio di errore (Non trovato, o Casella-Sfoglia-file vuota)

    $err1="EMPTY";


    // OK Message
    // Messaggio di OK

    $ok="OK";


    // Go-Back Message
    // Messaggio torna-indietro

    $back="Upload other files";


    // Number of simultaneus uploads min=1, max=14 
    // Numero di uploads simulanei min=1, max=14

    $up=1;


    // HTML code of the header of the page
    // Codice Html dell'header della pagina 

  5. #5
    Codice PHP:
    include "settings.php"; /*Inclusion of the config file*/ 

    if ($a<>'1') 

        ?> 
        <FORM METHOD="Post" ENCTYPE="multipart/form-data" ACTION="index.php"> 
        <input type=hidden name=a value=1> 
        <? 
        $k
    =1
        while (
    $k<=$up
        { 
            
    ?> 
             
            File <?=$k?>: <INPUT TYPE="file" NAME="file[]">

     
             
            <? 
            $k
    ++; 
        } 
        
    ?> 
        <INPUT TYPE="submit" value=UPLOAD></FORM> 
        <? 

    else 

        
    $k=1
        while (
    $k<=$up
        { 
            echo 
    "$c File $k"
            
    $t=$_FILES["file"]['tmp_name'][$k]; 
            
    $sz=$_FILES["file"]['size'][$k]; 
            
    $n=$_FILES["file"]['name'][$k]; 
            if (
    $t=='none'
            { 
                echo 
    ": $err1"
            } 
            elseif (
    $sz>$s
            { 
                echo 
    ": $err"
            } 
            else 
            { 
                echo 
    " ($n): "
                
    copy($t,"$d$n"); /* Copying the file */ 
                
    echo $ok
            } 
            echo 
    "
    "

            
    $k++; 
        } 
        echo 
    "

    <a href=\"index.php\">
    $back</a>"
    }
    I'm the solution
    http://www.mishacattaneo.ch/
    I'm fifteen. Scusate le domande ripetitive.

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.