Forum Moderators: coopster
$phsyical_address=$_SERVER["DOCUMENT_ROOT"];
include ("$phsyical_address/include/connection/index.php");
It worked fine on a server using PHP5 (Apache). However it does not work on another server I have that uses PHP4 (Apache).
So I changed the line to read:
$phsyical_address=$_SERVER["PATH_TRANSLATED"];
$skip=strlen($phsyical_address)-strlen($_SERVER["PHP_SELF"]);
$phsyical_address=substr($phsyical_address,0,$skip);
include ("$phsyical_address/include/connection/index.php");
This works fine on the php4 server - but not on the php5 server :(
Is there a certain line of code that I can use that will always produce the correct result?