[thelist] PHP question
Jason Morehead
jmorehead at alphalincoln.com
Tue Jul 18 15:54:40 CDT 2000
>I basically want to abstract the full path I need to use for includes,
>because it will change when I start staging the files ...
this is how i do it on my sites...
i set up an include file that contains a variable with the root path,
and call it something like $base. i call this include file before
the <HTML> tags, like so:
<?php require("vars.inc"); ?>
then, whenever i need to abstract the full path, i just insert the
variable like so:
<?php include("$path/includes/include.inc"); ?>
it's essentially what you've got, but a little bit more convoluted.
however, it works great for larger sites like mine. just remember to
have the right path when you're calling that "vars.inc" file at the
beginning of the document.
hth...
jason
--
http://www.alphalincoln.com/
alphagraphics of nebraska - web services
201 n 14th - lincoln, ne 68508 - 402.475.0000
More information about the thelist
mailing list