Hello everyone, sorry if this has been asked (I searched the forums for a good while), here goes: I have a tree of require()'s that looks like the following: index.php system/base.php system/class/fetchall.php system/class/query.php Now, in that list, the top file includes the file under it includes the file under it includes the file under it. This works fine. Now, in query.php I create a class called query. If I try to instantiate 'query' from base.php, I get the following error: [code]Fatal error: Cannot instantiate non-existent class: query in home/johnhorn/public_html/equilibrium/system/base.php on line 35[/code] After this didn't work, I tried the following: In base.php: [code]require($equilibrium_rootdir.'system/config.php'); require($equilibrium_rootdir.'system/includes/vars.php'); require($equilibrium_rootdir.'system/includes/constants.php'); require($equilibrium_rootdir.'system/class/query.php'); $query = new Query;[/code] Same error: [code]Fatal error: Cannot instantiate non-existent class: query in home/johnhorn/public_html/equilibrium/system/base.php on line 35[/code] Note that the class Query is defined in query.php. I know I'm doing something PHP doesn't allow, but I'm not sure what or how I can get around this. EDIT: I should note that all the files are being read from. I can echo data from any of them, which prints out in HTML in index.php.