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!! Link to comment https://forums.phpfreaks.com/topic/227551-php-dynamic-directories/ 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. Link to comment https://forums.phpfreaks.com/topic/227551-php-dynamic-directories/#findComment-1173768 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.