Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Notice: Undefined index: REMOTE_HOST

    Ho provato a scrivere questa riga di codice:


    codice:
    $str_host_ip = ($_SERVER['REMOTE_HOST'] == "") ? $_SERVER['REMOTE_ADDR'] : $_SERVER['REMOTE_HOST'];
    però nella pagina compare:

    Notice: Undefined index: REMOTE_HOST

    dov'è il problema?

    Saluti,
    carlostefano

  2. #2
    Utente di HTML.it L'avatar di DydBoy
    Registrato dal
    Jul 2005
    Messaggi
    165

    Re: Notice: Undefined index: REMOTE_HOST

    Quoto da PHP.net sulle variabili $_SERVER

    'REMOTE_HOST'

    The Host name from which the user is viewing the current page. The reverse dns lookup is based off the REMOTE_ADDR of the user.

    Note: Your web server must be configured to create this variable. For example in Apache you'll need HostnameLookups On inside httpd.conf for it to exist. See also gethostbyaddr().

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.