From: Jimmy H. <ji...@ha...> - 2001-07-06 06:29:55
|
Alex > for the distro version of r2, I want to get to the point > where a user can download the system, untar it, point their > browser to it, and have a functioning installation. This sounds like the best way to do it > I'm going to build a very simple little file called > binarycloud.php which will be included from each page in > htdocs: include_once('binarycloud.php'); note the > "pathlessness" - i.e. binarycloud.php will be in your > include_path. the idea behind this is to set the constant > BC_PATH before anything else happens, but to avoid using > prepends, etc to get that working. Agree - I don't like using prepend. > -does anyone know of a reason why > $HTTP_SERVER_VARS[DOCUMENT_ROOT] DOCUMENT_ROOT doesn't exist in IIS > <?php > $pieces = explode('/', $HTTP_SERVER_VARS[DOCUMENT_ROOT]); > $count = count($pieces); > > $cd_up = 1; > > for ($i=1; $i <= $count-$cd_up; $i++) { > $path .= '/'.$pieces[$i]; > } > $path .= '/binarycloud'; Why not use dirname() ? Regards, Jimmy |