Posted by Dikkie Dik on 12/25/06 14:09
>
> Like this:
> <div id="body">
> <?php include("phpincludes/server-nav.php"); ?>
> </div>
I would write this as
<?php
require_once(dirname(__FILE__) . '/phpincludes/server-nav.php');
?>
I use double quotes only for newlines and tabs. Also, PHP has a nasty
tendency to resolve relative paths with respect to the calling page, not
to the current page. So if this file was called from another directory,
the include file would be searched relative to _that_ directory first.
So I always use absolute paths.
Best regards
Navigation:
[Reply to this message]
|