title: php page doesn't rendering when connect to database
body: <p>I'm making simple php web page, using php5, mysql, Nginx.</p>
  
  <p>when connect to database, it suddenly freeze, and render nothing to browser..<br>
  my php code is this.</p>
  
  <pre><code>&lt;?php
    $host = 'localhost';
    $user = 'root';
    $password = '123456';
    $db_name = 'test';
  
    $link = new mysqli($host, $user, $password, $db_name);
  
    if($link-&gt;connect_errno) {
      echo "&lt;script&gt;alert('Connection Error....')&lt;/script&gt;";
    }
  
    if($link) {
      echo "&lt;script&gt;alert('Successfully connected!');&lt;/script&gt;";
    }
  ?&gt;
  </code></pre>
  
  <p>(lib/connect_db.php)</p>
  
  <pre><code>&lt;?php
     include './lib/connect_db.php';
  
     $create_user_query = 'CREATE TABLE ...';
     $admin_user_query = 'INSERT INTO ....';
     $create_widget_query = 'CREATE TABLE ...';
  
     if($link-&gt;query($create_user_query) === TRUE) {
       echo "&lt;script&gt;alert('Success!')&lt;/script&gt;";
     }
  
     $link-&gt;close();
  ?&gt; 
  </code></pre>
  
  <p>(init.php)</p>
  
  <p>index.php also include './lib/connect_db.php', it is OK. but init.php always causing problem.</p>
  
  <p>p.s. when I edited init.php to</p>
  
  <pre><code>&lt;script&gt;alert('...');&lt;/script&gt;
  &lt;?php
    ...
  ?&gt;
  </code></pre>
  
  <p>it doesn't call alert();</p>