ok, say i want a file to load in perl based on the hostname, i'd have it read something like this:
this way, it will load the file anytime spacetwins.com is loaded, www.spacetwins.com, anus.spacetwins.com, anything.spacetwins.com... you get the picture...
so how would this be done in php? i have:
but that doesn't work. i'd have to have:
i have to include every hostname, instead of just relying on the wildcard.
how would i modify that for php, so it deciphers it like in perl, based on the root hostname?
Code:
$host = "$ENV{'HTTP_HOST'}";
if ($host =~ /spacetwins\.com/) {
include "file.txt";
}
so how would this be done in php? i have:
Code:
<?
if ($HTTP_HOST =~ "spacetwins.com") {
include"file.txt";
}
?>
Code:
<?
if ($HTTP_HOST == "www.spacetwins.com" || $HTTP_HOST == "spacetwins.com") {
include"file.txt";
}
?>
how would i modify that for php, so it deciphers it like in perl, based on the root hostname?