Visualizzazione dei risultati da 1 a 4 su 4

Discussione: undefined variable

  1. #1
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507

    undefined variable

    ragazzi ho questo problema :

    Notice: Undefined variable: timeadjust in /home/web/www.sito.net/www/c/web/upload.php on line 152

    nella linea 152 ho: (che inizia da $reg)

    Codice PHP:
    // now, we start the upload 'process'. That is, to copy the uploaded file
            // from its temporary location to the wanted location
            // It could be something like $handle->Process('/home/www/my_uploads/');
            
    $handle->Process('usergallery/');
            
            
    // we check if everything went OK
            
    if ($handle->processed) {
                
    // everything was fine !

                
    echo '  file uploaded with success
    '
    ;
                echo 
    '  [img]usergallery/' $handle->file_dst_name '[/img]
    '
    ;
                
    $info getimagesize($handle->file_dst_pathname);
                echo 
    '  link to the file just uploaded: [url="../usergallery/' $handle->file_dst_name '"]' $handle->file_dst_name '[/url]
    '
    ;
                
    $imageurl "http://site.net/c/usergallery/$handle->file_dst_name";
                
    $reg mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', imageurl='".$imageurl."', sex='".$userinfo[1]."', time='".(time() - $timeadjust)."'");

            } else {
                
    // one error occured

                
    echo '  file not uploaded to the wanted location
    '
    ;
                echo 
    '  Error: ' $handle->error '
    '
    ;

            }

            
    // we delete the temporary files
            
    $handle-> Clean();

        } else {
            
    // if we're here, the upload file failed for some reasons
            // i.e. the server didn't receive the file

            
    echo '  file not uploaded on the server
    '
    ;
            echo 
    '  Error: ' $handle->error '';
        }
        

        echo 
    "</p>"
    riuscite a aiutarmi a risolvere???grazie...

  2. #2
    Per capire il significato di un tale messaggio ti suggerisco di leggere questo articolo:

    Notice: Undefined variable / index / offset

  3. #3
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    eh si...in effetti invio una foto tramite form da quella pagina...ma a capire l'errore non ci arrivo...

  4. #4
    Utente di HTML.it L'avatar di mybox
    Registrato dal
    Mar 2007
    Messaggi
    507
    Codice PHP:
    $reg mysql_query("INSERT INTO ibwf_gallery SET uid='".$uid."', imageurl='".$imageurl."', sex='".$userinfo[1]."', time='".(time() - $timeadjust)."'"); 
    questa riga mi da questo errore:

    Notice: Undefined variable: timeadjust in /home/web/www.mysite.it/www/c/web/upload.php on line 152
    riuscite a darmi una mano???

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