Can anyone improve on this?
| From: | George Pitcher | Date: | Mon, 08 Apr 2002 12:57:22 +0000 |
| Subject: | Can anyone improve on this? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-92141@lists.php.net to get a copy of this message | ||
Hi all,
I'm working on a small solution and want to do some configuration during the
initialising process.
The solution is aimed at non tecchies in universities and the idea is that
the system does some of the environment stuff for them.
This is the first time I've done any of this stuff so I might be off-target.
Any suggested imptovements?
George
<?php
if(in_array("Windows_NT",$HTTP_ENV_VARS)){
$pdf_path="C:\\Pdf\\";
if(substr($SERVER_SOFTWARE,0,6)=="Apache"){
$webroot=$DOCUMENT_ROOT;
}elseif(substr($SERVER_SOFTWARE,0,13)=="Microsoft-IIS"){
$webroot=str_replace(str_replace("/","",$PATH_INFO),"",$PATH_TRANSLATED);
}
}elseif(in_array("linux_gnu",$HTTP_ENV_VARS)){
$pdf_path="/var/pdf/";
if(substr($SERVER_SOFTWARE,0,6)=="Apache")
$webroot=$DOCUMENT_ROOT;
}
?>