Visualizzazione dei risultati da 1 a 7 su 7

Discussione: messaggio d errore

  1. #1
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802

    messaggio d errore

    salve ragazzi secondo voi cosa potrebbe essere questo errore ?
    Fatal error: Call to a member function checkDomain() on a non-object in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\whois\whois.php on line 102
    posto la linea 102

    Codice PHP:

    if(!$resultObj $tldList$tld ]->checkDomain($domain$tld)){

    die(
    '&error= Si sono verificati dei problemi, ci scusiamo per il disservizio') ; 
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  2. #2
    Semplicemente credo che $tldList[ $tld ] non è un oggetto della classe cui appartiene il metodo checkDomain: quindi non puoi applicarlo.
    http://www.beavermag.it

  3. #3
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    e cosa potrei fare?
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  4. #4
    Applicare il metodo all'oggetto corretto.
    http://www.beavermag.it

  5. #5
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    mi potresti fare un esempio di come fare
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

  6. #6
    Non ho idea di cosa faccia il tuo codice prima di lanciare quel metodo, semplicemente l'elemento su cui tu applichi il metodo di quella classe non è un oggetto di quella classe e quindi non è possibile procedere oltre.
    http://www.beavermag.it

  7. #7
    Utente di HTML.it
    Registrato dal
    May 2007
    Messaggi
    1,802
    posto lo script
    Codice PHP:
    <?php 
    /*
    Includo le classi
    */
    include_once('errori.php') ;
    include_once(
    'principale.php') ;
    include_once(
    'oggetti.php') ;

    /*
    Definisco alcuni oggetti WHOISdb precisando per ognuno il server e la stringa che indica la disponibilità del dominio.
    Aggiungi gli altri che ti interessano.
    */
    $euObj = new WHOISdb('whois.eu''free') ;

    $itnicObj = new WHOISdb('whois.nic.it''available') ;

    $internicObj = new WHOISdb('whois.internic.net''no match for') ;

    $orgObj = new WHOISdb('whois.pir.org''not found') ;

    $bizObj = new WHOISdb('whois.nic.biz''not found') ;

    $infoObj = new WHOISdb('whois.afilias.info''not found') ;

    /*$nameObj = new WHOISdb('whois.usp.ac.fj', 'was not found') ;*/
    $mobiObj = new WHOISdb('whois.afilias.info''not found') ;

    $atObj = new WHOISdb('whois.aco.net''nothing found') ;

    $ccObj = new WHOISdb('whois.nic.cc''no match') ;

    $chObj = new WHOISdb('whois.nic.ch''we do not have an entry') ;

    $usObj  = new WHOISdb('whois.nic.us''not found') ;

    $coukObj = new WHOISdb('whois.nic.uk''no match') ;

    $orgukObj = new WHOISdb('whois.nic.uk''no match') ;

    $deObj = new WHOISdb('whois.denic.de''free') ;

    $dkObj = new WHOISdb('whois.dk-hostmaster.dk''no entries') ;

    $frObj = new WHOISdb('whois.nic.fr''no entries') ;

    $uaObj = new WHOISdb('whois.net.ua''No entries found') ;

    $comuaObj = new WHOISdb('whois.net.ua''No entries found') ;

    $ruObj = new WHOISdb('whois.ripn.ru''no entries found') ;

    $comruObj = new WHOISdb('whois.ripn.ru''no entries found') ;

    $netruObj = new WHOISdb('whois.ripn.ru''no entries found') ;

    $orgruObj = new WHOISdb('whois.ripn.ru''no entries found') ;

    $tvObj = new WHOISdb('whois.[url]www.tv[/url]''available') ;

    $wsObj = new WHOISdb('whois.worldsite.ws''no match') ;

    /*
    Array che associa i TLD al corretto WHOIS database
    */
    $tldList = array( 
    'eu' => $euObj,
    'it' => $itnicObj,
    'com' => $internicObj,
    'net' => $internicObj,
    'org' => $orgObj,
    'biz' => $bizObj,
    'info'  => $infoObj,
    'name' => $nameObj,
    'mobi' => $mobiObj,
    'at'  => $atObj
    'cc'  => $ccObj,
    'ch'  => $chObj,
    'us'  => $usObj,
    'co.uk' => $coukObj,
    'org.uk' => $orgukObj,
    'de'  => $deObj,
    'dk' => $dkObj,
    'fr'  => $frObj,
    'ua'  => $uaObj,
    'com.ua'  => $comuaObj,
    'ru'  => $ruObj,
    'com.ru'  => $comruObj,
    'net.ru'  => $netruObj,
    'org.ru'  => $orgruObj,
    'tv'  => $tvObj,
    'ws' => $wsObj,
    );
     

    /*
    dati provenienti da form

    */
    $domain $_REQUEST[dominio];
    $tld $_REQUEST[tld];

    if(!
    $resultObj $tldList$tld ]->checkDomain($domain$tld)){

    die(
    '&error= Si sono verificati dei problemi, ci scusiamo per il disservizio') ;
    /*
    debug
    */
    $tldList$tld ]->getErrors() ;
    }

    elseif( 
    $resultObj->isAvailable() ){

    echo(
    '&mess='.$resultObj->getDomain().' è disponibile') ;

    }

    else{

    echo(
    '&mess='.$resultObj->getDomain().' non è disponibile') ;
    echo(
    '&mess1= '.$resultObj->getInfo().'') ;
    }


    ?>
    Non è tanto importante saper fare,quanto ad avere voglia d imparare .

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.