|
Posted by Daz on 01/11/07 02:42
Michael Fesser wrote:
> .oO(Toby Inkster)
>
> >However, it's a good idea to have a specific "includes" directory, put all
> >your included files into there and then just refer to them as:
> >
> > include 'myfile.php';
> >
> >without including a directory path at all(!) but instead using the
> >include_path setting to specify where include files will be found.
>
> I prefer absolute paths, so I usually define a constant which contains
> the path to my include files, based on $_SERVER['DOCUMENT_ROOT'].
>
> Micha
I know there you are coming from, although I prefer relative, mainly
because my modules then become portable and self-contained. If I decide
to build a new site at any point with a different structure but using
the same modules, the include paths won't need to be changed.
All the best.
Daz.
Navigation:
[Reply to this message]
|