RE: [PHP] Includes and paths problem

From: Date: Sat, 19 Apr 2003 00:17:56 +0000
Subject: RE: [PHP] Includes and paths problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144449@lists.php.net to get a copy of this message
> When you say "absolute" is this absolute to your root directory of your > website or your computer. Sorry if this sounds stupid, but I have been > struggling with this for some time and want to be sure I'm doing this > right. > So in your example ($_CONF['path'] = '/home/web/www/site';) - what is this > in relation to? Oh, by the way - this is Windows 2000 server using IIS > (not > my idea). To your computer. So, for windows, you could have something like this: $_CONF['path'] = 'C:/inetpub/wwwroot/site'; for example. Then you just use that to build your includes. If you want to include the file 'include.php' that's in the root of your web site, then you can use include($_CONF['path'] . '/include.php'); from any file on your site, no matter what directory or subdirectory it's in. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#144449) next »