title: how to include database login for connect to mysqli with file configuration .env?
body: <p>i try include config of login database with file .env but not work.</p>
  
  <p>here my config file .env</p>
  
  <pre><code>DB_CONNECTION=mysql
  DB_HOST=localhost
  DB_PORT=3306
  DB_DATABASE=laravel
  DB_USERNAME=root
  DB_PASSWORD=
  </code></pre>
  
  <p>here my code :</p>
  
  <pre><code>&lt;?php
  
      include_once ".env";
  
      $host = "DB_HOST";
      $user = "DB_USERNAME";
      $pass = "DB_PASSWORD";
      $db = "DB_DATABASE";
  
      $mysqli = new mysqli($host, $user, $pass, $db);
  
      if ($mysqli-&gt;connect_errno)
          {
              printf("&lt;br&gt;&lt;br&gt;&lt;br&gt;");
              printf("Error connect: %s\n", $mysqli-&gt;connect_error);
              exit();
          }
  
      echo 'laravel';
  
  ?&gt;
  </code></pre>
  
  <p>i try with my code but i get error : <code>Error connect: Unknown MySQL server host 'DB_HOST' (2)</code> </p>