require_once doesn't work in PHP
<p>If I try to open this simple file in my Browser:</p>

<pre><code>&lt;?php

require_once 'classes/settings.php';

class Mysql {

    private $conn;

    function __construct() {

        $this-&gt;conn = new mysqli (DB_SERVER,DB_USER,DB_PASSWORD,DB_MEMBER) or die('There was a problem connecting to the database.');
        if ($this-&gt;conn-&gt;connect_errno) {
echo "Failed to connect to MySQL: (" . $this-&gt;conn-&gt;connect_errno . ") " . $this-&gt;conn-&gt;connect_error;
}
 //echo $mysqli-&gt;host_info . "\n";
    }

    function verify_Username_and_Pass($un, $pwd) {

        $query = "SELECT *
        FROM users
        WHERE username = ? AND password = ?
        LIMIT 1";

        if($stmt = $this-&gt;conn-&gt;prepare($query)) {

            $stmt-&gt;bind_param('ss',$un,$pwd);
            $stmt-&gt;execute();

            if($stmt-&gt;fetch()) {    
                $stmt-&gt;close();
                return true;
            }
        }
    }
}
 ?&gt;
</code></pre>

<p>I receive this warning error:</p>

<pre><code>Warning: require_once(classes/settings.php): failed to open stream: No such file or 
directory in /var/www/classes/Mysql.php on line 3 Fatal error: require_once(): Failed 
opening required 'classes/settings.php' (include_path='.:/usr/share/php:/usr/share/pear') 
in /var/www/classes/Mysql.php on line 3
</code></pre>

<p>I can't understand why, the file <code>setting.php</code> is in that folder, so what is the problem?</p>

<hr>

<p><strong>EDIT</strong>:</p>

<p>if I do the same this with another file for example this:</p>

<pre><code>&lt;?php 
require_once 'classes/settings.php';


 $host = "localhost";
 $user = "root";
 $pass = "pass";

 $databaseName = "membership";
 $tableName = "users";

 //--------------------------------------------------------------------------
 // 1) Connect to mysql database
 //--------------------------------------------------------------------------

 $con = mysql_connect($host,$user,$pass);
 $dbs = mysql_select_db($databaseName, $con);

 //--------------------------------------------------------------------------
 // 2) Query database for data
 //--------------------------------------------------------------------------
 $result = mysql_query("SELECT * FROM $tableName");            //query
 $array = mysql_fetch_row($result);                          //fetch result    

 //--------------------------------------------------------------------------
 // 3) echo result as json 
 //--------------------------------------------------------------------------
 echo json_encode($array);

?&gt;
</code></pre>

<p>In this way, it works without problem, I can't understand why the file and the path is right because in this second piece code all work.</p>
