Forum Moderators: coopster

Message Too Old, No Replies

PHP version 5.2.6 and its path issues

         

toplisek

1:50 pm on Dec 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Is there any path system in PHP version 5.2.6?

I have code like:
Path variable
$_PATH1 = "http://" . $_SERVER['HTTP_HOST']."/";

and
<?PHP include($_PATH1.'en-US/footer/'."footer_si.php");?>

It does not work any more.Is there new path system on server using PHP version 5?

coopster

5:03 pm on Dec 2, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



No, but it may be your server setup or the incoming request. HTTP_HOST may or may not be present. I often use the following code when I am setting up the host/server name.
$server = (isset($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];

... on a side note, there is a similar discussion running right now ...
[webmasterworld.com...]