How can i access a file outside of htdocs folder on windows? I have a config file outside of my root (htdocs) folder, in which i want to save off the configuration for my database connection, but when i call it, it says no file found.
i am cureently in the following directory: xampp\htdocs\includes
and my config file is in: \xampp\inc
i tried to echo the path, but i didn't get any output
echo realpath('../..inc/config.php') . PHP_EOL;
if (!file_exists('../../inc/config.php')) {
throw new Exception("No config file found!");
}
echo
therealpath()
or does it get to throw the Exception? – NaijaProgrammer