$DOCUMENT_ROOT behavior linux vs solaris
| From: | Dennis Moore | Date: | Wed, 20 Mar 2002 07:14:16 +0000 |
| Subject: | $DOCUMENT_ROOT behavior linux vs solaris | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-89286@lists.php.net to get a copy of this message | ||
I use the $DOCUMENT_ROOT environment variable quite ofter to build an absolute path to files in the
web tree. I just ran into a problem moving my code from a linux box (RH6.2) to a SunW Ultra 60.
Both machines are running the same version of Apache 1.3.20 and PHP4.0.6. Here's the rub.
On the sun, $DOCUMENT_ROOT would add a slash at the end of the line where as the linux box would
not.
For example:
Linux $DOCUMENT_ROOT: /www/dir/htdocs
Sun $DOCUMENT_ROOT: /www/dir/htdocs/
So when I build my paths I get an extra "/". Is there any way to make Sun version to work
like the Linux version. I hate to go back and change all my code.
Thanks in advance...