2 // First, let's make sure that path_to_prepend.txt exists
3 $strPathToPrependTextFile = dirname(__FILE__
) . '/path_to_prepend.txt';
4 if (!is_file($strPathToPrependTextFile))
5 exit("No path_to_prepend.txt file was found.\r\nPlease be sure to specify the absolute path to prepend.inc.php in the ./path_to_prepend.txt file!\r\n");
7 // Next, use the absolute path found in path_to_prepend.txt
8 $strPathToPrepend = trim(file_get_contents($strPathToPrependTextFile));
10 if (!is_dir($strPathToPrepend))
11 exit("The text value found in the ./path_to_prepend.txt file does not appear to be a valid directory.\r\nPlease be sre to specify the correct absolute path to prepend.inc.php in the ./path_to_prepend.txt file!\r\n");
13 // If it exists, require() it -- otherwise, report the error
14 if (file_exists($strPathToPrepend . '/prepend.inc.php'))
15 require($strPathToPrepend . '/prepend.inc.php');
17 exit("The prepend.inc.php file was not found at $strPathToPrepend.\r\nPlease be sre to specify the correct absolute path to prepend.inc.php in the ./path_to_prepend.txt file!\r\n");
19 // Finally, verify that __DEVTOOLS_CLI__ is configured correctly
20 if (!is_file(__DEVTOOLS_CLI__
. '/' . basename(__FILE__
)))
21 exit("The __DEVTOOLS_CLI__ configuration constant in configuration.inc.php does not appear to be set correctly.\r\n");
23 $objStat1 = stat(__DEVTOOLS_CLI__
. '/' . basename(__FILE__
));
24 $objStat2 = stat(__FILE__
);
25 if ($objStat1['ino'] != $objStat2['ino'])
26 exit("The __DEVTOOLS_CLI__ configuration constant in configuration.inc.php does not appear to be set correctly [INode Mismatch].\r\n");
28 // Finally, turn off output buffering