JonnySnip3r Posted February 13, 2011 Share Posted February 13, 2011 Hey guys does anyone know of a good dynamic directory solution? What i mean by this is when i am creating an application and i use require_once 'includes/config.php'; and then i create a class that needs the config file so i include it into the class like so: require_once '../include/config.php'; then i make a new folder named member then i have to require this class (created above) and it fails to find the directory. What would be a good solution for this? Thanks guys!! Quote Link to comment Share on other sites More sharing options...
lastkarrde Posted February 13, 2011 Share Posted February 13, 2011 Well for one your include(s) directory is spelled differently in those statements. require_once 'includes/config.php'; require_once '../include/config.php'; Can you show us the directory structure of the application? Knowing the location of the files relative to each other is important. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.