[thelist] PHP breadcrumbs & directory navigation

Jackson Yee jyee at vt.edu
Thu Jan 23 18:00:09 CST 2003

"Howard Cheng" <howcheng at ix.netcom.com> wrote in message
news: at popd.ix.netcom.com...
> <?
> include("{$_SERVER['DOCUMENT_ROOT']}/incl/conf.php");
> ?>
> The braces {} are necessary for interpreting hash (associative array)
> variables properly. If it's just an indexed array, you wouldn't need the
> braces.

[Coming from the guy who believes that the brace notation is perverse and

Alternatively, just concatenate two strings together:

<?php include($_SERVER['DOCUMENT_ROOT'] . '/incl/conf.php'); ?>

Akeem's right though - using a template is the overall simplest and most
effective way of dealing with PHP Includes From Hell(TM).  Absolute paths
are your next best bet.  I used both combined with mod_rewrite, confusing
the heck out of anyone who ever tried to understand my management system.

Jackson Yee
jyee at vt.edu

More information about the thelist mailing list