[PHP] Re: functions and scoping

2002-05-23 Thread David Huyck
The idea is to allow an application to be distributed easily without any reconfiguration. If it doesn't need any variables to tell it where it is in the directory structure, it won't matter where it is placed in someone else's application-- it will just work because of the relative includes.

[PHP] Re: functions and scoping

2002-05-22 Thread Michael Virnstein
Why not simply define a set of variables for root dir and the other directories, and use full paths in your includes? $root = /wwwroot/mydomain/public/; $homepageroot = /; $mydir = subdir/; now you can do: include $rootpath.$mydir.inc.php; and a href=?php echo $hompageroot.$mydir.inc.php;