Given the following dir structure and files:
apache_htdocs/
script.php
codefiles/
code.php
othercode.php
% cat script.php
<?php require("../codefiles/code.php"); ?>
% cat code.php:
<?php
print "something";
require("othercode.php");
?>
By retrieving script.php via the web I'll get a PHP Warning & Fatal Error that it was not able to open othercode.php.
It appears the default include_path of "." is for the originally called script only; in this case the include_path is apache_htdocs/
Is there someway of modifying the include_path outside php.ini (i.e., inside code.php) or some other way of accomplishing this?