php header location redirect blank page
<p>I have a problem with header location redirect me to a blank page without making me see the code and the browser does not report any error. I work locally with exampp</p>

<pre><code>class UserController
{
    public $username = '';
    private $logged   = false;
    private $usermodel = '';

    public function __construct()
    {   session_start();
        $this-&gt;usermodel = new UserModel();



        if ($_SERVER['REQUEST_METHOD']=='POST' &amp;&amp; isset($_GET['action'])&amp;&amp; $_GET['action']== 'login' ){
            $username = (isset($_POST['username']))? $_POST['username'] :false ;
            $password = (isset($_POST['password']))? $_POST['password'] :false ;

            if ($username !=false &amp;&amp; $password !=false &amp;&amp; $this-&gt;usermodel-&gt;checkLogin($username, $password)){

                $this-&gt;username =$username ;
                $this-&gt;logged = true ;

                $_SESSION['username']= $username ;
                $_SESSION['logged']= true ;
                $_SESSION[ 'message' ]  = 'Login effettuato correttamente';
            }else{
                $_SESSION[ 'message' ]  = 'Errore con il login; riprovare!';
            }
        }
        elseif (isset($_GET['action'])&amp;&amp; $_GET['action']== 'logout'){
            unset($_SESSION['username']);
            unset($_SESSION['logged']);
            $_SESSION[ 'message' ] = 'Logout effettuato correttamente';
        }
        elseif (isset($_SESSION['username'])&amp;&amp; isset($_SESSION['logged'])){

            $this-&gt;username = $_SESSION['username'] ;
            $this-&gt;logged = true ;
        }
        elseif(($_SERVER['REQUEST_METHOD']=='POST' &amp;&amp; isset($_GET['action'])&amp;&amp; $_GET['action']== 'registra' )){

            $username = (isset($_POST['username']))? $_POST['username'] :false ;
            $password = (isset($_POST['password']))? $_POST['password'] :false ;
            $repassword = (isset($_POST['repassword']))? $_POST['repassword'] :false ;
            $nome_reale = (isset($_POST['nome_reale']))? $_POST['nome_reale'] :false ;
            $email = (isset($_POST['email']))? $_POST['email'] :false ;



            if ($username !=false &amp;&amp; $password !=false &amp;&amp; $repassword !=false &amp;&amp; $nome_reale &amp;&amp; $email !=false
               &amp;&amp; $this-&gt;usermodel-&gt;Registration($username,$password,$repassword,$nome_reale,$email) )
            {
                $this-&gt;username =$username ;
                $this-&gt;logged = true ;


                $_SESSION['username']= $username ;
                $_SESSION['logged']= true ;
                $_SESSION[ 'message' ]  = "registrazione effettuato correttamente benvenuto $username";
            }
        }
        $this-&gt;redirectToProperArea();
    }

    public function logged(){
        return $this-&gt;logged ;
    }
    public function redirectToProperArea(){

        $script_file = basename( $_SERVER[ 'SCRIPT_NAME' ] );

        if ( $this-&gt;logged() &amp;&amp; $script_file == 'login.php' ) {

            ob_end_clean();
            header('Location: ../index.php' );
            exit;
        } 
        elseif ( !$this-&gt;Logged() &amp;&amp; ( $script_file == 'index.php' &amp;&amp; isset( $_GET[ 'action' ] ) &amp;&amp; $_GET[ 'action' ] != 'index' &amp;&amp; $_GET[ 'action' ] != 'detail' &amp;&amp; $_GET[ 'action' ] != 'logout' ) ) {

            ob_end_clean();
            header('Location: ../login.php');
            exit;
        }
        elseif ( $this-&gt;logged() &amp;&amp; $script_file == 'registra.php' ) {

            ob_end_clean();
            header('Location: views/benvenuto.php');
            exit;
        }
    }
}
</code></pre>