title: require() not working for file even within same folder
body: <p>This works in localhost on my PC, as well as localhost on the remote server:</p>
  
  <p>connection.php</p>
  
  <pre><code>&lt;?php
      $server   = "localhost";
      $database = "somedatabase";
      $username = "someuser";
      $password = "somepassword";
  
   $mysqlConnection = mysql_connect($server, $username, $password);
      if (!$mysqlConnection)
          {
              echo "Please try later.";
          }
      else
          {
              mysql_select_db($database, $mysqlConnection);
          }
  ?&gt;
  </code></pre>
  
  <p>However, while this works in localhost on my PC, it doesn't work on localhost on the remote server (<code>db.php</code> and <code>connection2.php</code> are in the same folder). I get "Please try later" echoed out.</p>
  
  <p>db.php</p>
  
  <pre><code>&lt;?
      $server   = "localhost";
      $database = "somedb";
      $username = "someuser";
      $password = "somepass";
  ?&gt;
  </code></pre>
  
  <p>connection2.php</p>
  
  <pre><code>&lt;?php
      require("db.php");
  
      $mysqlConnection = mysql_connect($server, $username, $password);
          if (!$mysqlConnection)
              {
                  echo "Please try later.";
              }
          else
              {
                  mysql_select_db($database, $mysqlConnection);
              }
  ?&gt;
  </code></pre>
  
  <p>Thoughts?</p>
  
  <p>Update: Per CharlesRojas' suggestion, I tried echoing out the variables in <code>connection2.php</code> but nothing got echoed out. So, <code>connection2.php</code> is not reading the contents in <code>db.php</code>. </p>
  
  <p>Update 2: I've added the solution below and will mark it as correct when I am able.</p>