Hi PHP Experts,
I am writing a wrapper over some existing code and when I hoped that I
almost successfully completed it, I ran into the wall.
The wrapper file is in /var/www/sites/project/ as xyz.php and the file
includes some of the files from various paths.
Starting with
==============
// Importing Init.php for initializing the libraries
include_once("checkout/controller/Init.php");
and this Init.php in /var/www/sites/project/checkout/controller loads the
configuration file and code is as below.
============================================
if(file_exists("../common/config.ini")) {
$configData = parse_ini_file("../common/config.ini");
} else {
$configData = false;
}
if (!$configData) {
die("An error occurred while trying to get ".
"confidential config data. Please ensure that the ".
"pathname to this file in Init.php ".
"is correct.");
}
============================================
This config.php file is in /var/www/sites/project/common/ but there is some
messup in the path and its not setting to the right path as it must looking
for the file with include path set to /var/www/sites/project/ rather
/var/www/sites/project/checkout(it works if I keep the xyz.php file in
checkout folder. But I want this file to be in parent folder for various
other reasons and I cant figure out for nuts how to make this path thing
work.
Thanks,
Gowtham.N