the_pm
04-15-2007, 11:57 AM
Hello everyone,
I have what I hope is a pretty basic question regarding ASP and converting over some simple PHP operations.
I'm looking for a way to identify components within a URL and take actions as a result of what's found. For example:
<?php
if (strpos($HTTP_HOST, 'example.com') !== FALSE) {
include('example.php');
}
?>
This snippet looks for the host name 'example.com' and upon finding it, includes the file 'example.php'. Real simple.
Another:<?php
if ($_SERVER['PHP_SELF'] === '/example.php') {
echo "
Foo!
";
}
?>This snippet looks for '/example.php' and finding it, echoes the string "Foo!"
How would these types of procedures be done in ASP? My familiarity with ASP is very low, but I can follow along with markup reasonably well :)
I have what I hope is a pretty basic question regarding ASP and converting over some simple PHP operations.
I'm looking for a way to identify components within a URL and take actions as a result of what's found. For example:
<?php
if (strpos($HTTP_HOST, 'example.com') !== FALSE) {
include('example.php');
}
?>
This snippet looks for the host name 'example.com' and upon finding it, includes the file 'example.php'. Real simple.
Another:<?php
if ($_SERVER['PHP_SELF'] === '/example.php') {
echo "
Foo!
";
}
?>This snippet looks for '/example.php' and finding it, echoes the string "Foo!"
How would these types of procedures be done in ASP? My familiarity with ASP is very low, but I can follow along with markup reasonably well :)
