Welcome Guest, Not a member yet? Register   Sign In
Personal library and Undefined property $input
#5

[eluser]luca89pe[/eluser]
Thank you to DarkManX too!
I wrote this:
Code:
function __construct() {
        $this->CI = & get_instance();
    }
and if i write this:
Code:
if (!isset($_SERVER['PHP_AUTH_USER'])) {
            header("WWW-Authenticate: Basic realm=\"Effettua il Login!\"");
            Header("HTTP/1.0 401 Unauthorized");
            exit;
        }
#Verifichiamo se il Login è corretto...
        else if (($this->CI->input->server('PHP_AUTH_USER') == $user) && (hash("sha256", $this->CI->input->server('PHP_AUTH_PW')) == $pass))
            return 1;
#Se il Login non è corretto...
        else
            return 0;
    }
but if i try changing this:
Code:
if (!isset($_SERVER['PHP_AUTH_USER'])) {
with this:
Code:
if (!isset($this->CI->input->server['PHP_AUTH_USER'])) {
it shows the authentication dialog in loop!


Messages In This Thread
Personal library and Undefined property $input - by El Forum - 08-28-2012, 08:33 AM
Personal library and Undefined property $input - by El Forum - 08-28-2012, 08:41 AM
Personal library and Undefined property $input - by El Forum - 08-28-2012, 08:53 AM
Personal library and Undefined property $input - by El Forum - 08-28-2012, 08:55 AM
Personal library and Undefined property $input - by El Forum - 08-29-2012, 09:14 AM
Personal library and Undefined property $input - by El Forum - 08-29-2012, 01:38 PM
Personal library and Undefined property $input - by El Forum - 12-21-2012, 05:17 AM
Personal library and Undefined property $input - by El Forum - 12-21-2012, 08:37 AM
Personal library and Undefined property $input - by El Forum - 12-21-2012, 10:07 AM
Personal library and Undefined property $input - by El Forum - 12-21-2012, 11:26 AM
Personal library and Undefined property $input - by El Forum - 12-21-2012, 11:33 AM
Personal library and Undefined property $input - by El Forum - 12-24-2012, 07:41 AM
Personal library and Undefined property $input - by El Forum - 12-24-2012, 09:18 AM
Personal library and Undefined property $input - by El Forum - 12-28-2012, 06:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB