NYCPHP Meetup

NYPHP.org

[nycphp-talk] DocumentRoot array oddness.

leam at reuel.net leam at reuel.net
Thu Sep 1 11:21:50 EDT 2005


I know I'm doing something wrong, just not sure what.

Here's the output from the web page:

DOCDIR is Array

PHPDIR is /home/alba/php

Here's the PHP bit that creates it:

	$DOCDIR = explode("/", "$_SERVER[DOCUMENT_ROOT]");
	echo "<p>DOCDIR is $DOCDIR";
	array_pop($DOCDIR);
	array_push($DOCDIR , "php");
	$PHPDIR = implode("/", $DOCDIR );
	echo "<p>PHPDIR is $PHPDIR";
	array_pop($DOCDIR);

$DOCDIR *should* be /home/alba. Or even the acutal DocumentRoot as alba is a v-host. It should *not* be "Array", and for the life of me I can't see how $PHPDIR gets set with $DOCDIR in a mess.

What do I need to straighten out?

ciao!

leam





More information about the talk mailing list