From: [EMAIL PROTECTED] Operating system: All PHP version: 4.1.0 PHP Bug Type: Feature/Change Request Bug description: Allow include() & friends to use relative paths better
Currently all include()-type functions with relative include paths are relative to file, which is server by webserver ($SCRIPT_NAME). It would make life a lot easier if include() could be enchanced to accept optional flag parameter (or perhaps it would be better to create new function names to avoid magic-flag -pollution). And if it's set, include would be done relative to including file (instead of $SCRIPT_NAME). For example with this ability, following code should work as expected: index.php (also $SCRIPT_NAME): <?php include("include/second.php"); ?> include/second.php: <?php include("third.php",1); ?> include/third.php: <?php echo "Ok."; ?> This allows much easier code portability where directory trees are different (difficult to play with $DOCUMENT_ROOT). -- Edit bug report at: http://bugs.php.net/?id=14638&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]