Results 1 to 1 of 1
Jan 29, 2001, 12:31 #1
- Join Date
- Oct 2000
- 0 Post(s)
- 0 Thread(s)
I'm trying to work out how to change the file included on a php page with respect to the page url.
The idea is this
sport/home.php should include sport/home.htm
sport/away.php should include sport/away.htm
can I use $PHP_SELF to do this?
would this work:
$includefile = str_replace(".php", ".htm", basename($PHP_SELF));
include("sport/ . $includefile");