0

Am new coder leaner and my problem is when Am trying to open the index.php in XAMPP's htdocs folder some thing like this below is appearing directly on browser:

So I can't understand if that kind of issue is just common or not.

<?php
    if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
        $uri = 'https://';
    } else {
        $uri = 'http://';
    }
    $uri .= $_SERVER['HTTP_HOST'];
    header('Location: '.$uri.'/dashboard/');
    exit;
?>

Something is wrong with the XAMPP installation

Funk Forty Niner
  • 74,372
  • 15
  • 66
  • 132
  • You mean it's appearing as text/code right? I am under the impression you're running this directly into your browser as `file:///` instead of `http://localhost` am I right? I am confident I am right. – Funk Forty Niner Nov 23 '16 at 18:27
  • I using all that methods but index.php file did not executed well I guess because on tutorial I saw differ. please I need help. – Joseph Aggrey Mhecha Nov 24 '16 at 18:18

0 Answers0