Need help on current working directories

From: Date: Thu, 29 Nov 2001 21:05:46 +0000
Subject: Need help on current working directories
Groups: php.general 
Request: Send a blank email to php-general+get-76100@lists.php.net to get a copy of this message
Hi: I'm coding pages that need to include some general functions. File1 is an example of those pages. I also need to use the very same function file across several web sites. So, I created an additional file, where I have listed all the options for a particular site (which is then included into functions.php). The problem is how to properly include "options.php"? FYI, functions.php and options.php are located in the same directory. if file1.php and functions.php are in the same directory, no problem. if file1 is not in the same directory as functions.php, I can change the path for "include('here\there\here\functions.php')", but I cannot read options.php (because the current working directory is the one were file1.php is located). Any help? Thanks. Jean-Louis File 1: -------- <? include ("functions.php") ; $myvar=... ?> File functions.php ------------------------- <? include ("options.php"); function f1() {..} File Options.php ----------------------- <? define(DATA1,1); define(DATA2,345); .... ?>

« previous php.general (#76100) next »