An easy way to fix this common problem is this: define('BASE_INCLUDE_PATH','/var/www/includes/');
include(BASE_INCLUDE_PATH.'my_include.inc'); Just make sure to include the file with the BASE_INCLUDE_PATH define using a relative path ... ie. <? include('./init.inc'); ?> --Joe On Sat, Nov 17, 2001 at 05:15:02PM +0100, Mitja Pagon wrote: > Hi! > > I want to know if there is a way to include(require) a file using a path > relative to web server root. > > I'm aware of the fact that you can specify include path, but I believe that > this is not the best solution, since applications written that way aren't > easily portable. > > What I'm looking for is something similar to what "/" does in HTML paths and > SSI include directives. > > Thanks, > > Mitja Pagon > > > > -- > PHP General 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] Joe Stump <[EMAIL PROTECTED]> ------------------------------------------------------------------------ "How would this sentence be different if pi equaled 3?"
msg41133/pgp00000.pgp
Description: PGP signature